---
title: How do you find AI agents running in CI/CD pipelines?
url: https://opencontroller.lyzr.com/blog/find-ai-agents-in-ci-cd-pipelines
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# How do you find AI agents running in CI/CD pipelines?

**Search every workflow file for AI actions and model API secrets, list which repositories have AI GitHub Apps installed, and check which coding agents can be triggered from issues or pull requests. Then use your CI platform's allowed-actions policy so new AI actions need approval before they can run.**

CI/CD is where AI agents get write access without anyone noticing. A developer adds a review bot to a workflow. A team installs an app that turns an issue comment into a pull request. Each one holds a model key and a token that can push code. This guide is part of our [shadow AI agent discovery guide](/blog/how-to-find-shadow-ai-agents).

## What do AI agents in pipelines look like?

They come in three shapes:

| Shape | Example | What it can do |
|---|---|---|
| AI action in a workflow | `anthropics/claude-code-action@v1` in `.github/workflows/` | Runs on a trigger, reads code, comments, pushes commits |
| Platform coding agent | GitHub Copilot coding agent, assigned an issue | Works in its own environment and opens a pull request |
| Custom script calling a model | A job that calls a model API with a stored secret | Whatever the script and token allow |

All three need a model credential and a repository token. That pair is what you are looking for.

## How do you scan workflow files?

Use code search across your organisation, or clone and grep. Look for:

1. **AI actions by name.** Search `uses:` lines for known AI actions, such as `anthropics/claude-code-action`, and for actions whose names include model or vendor terms.
2. **Model secrets.** Search for secret names such as `ANTHROPIC_API_KEY`, `CLAUDE_CODE_OAUTH_TOKEN`, `OPENAI_API_KEY` and `AZURE_OPENAI_API_KEY`, and for cloud-provider flags like `use_bedrock`, `use_vertex` or `use_foundry`.
3. **Comment triggers.** Workflows on `issue_comment` or `pull_request_review_comment` with an `if:` that checks for a mention such as `@claude`. These let anyone with access start an agent.
4. **Write permissions.** `contents: write`, `pull-requests: write` and `id-token: write` in the same job as a model secret.
5. **Scheduled runs.** `schedule:` triggers with a model secret are agents running unattended.

Anthropic's [Claude Code GitHub Actions documentation](https://code.claude.com/docs/en/github-actions) is a useful reference for what a typical AI workflow looks like: it responds to `@claude` mentions, can run on any GitHub event when given a prompt, and supports Amazon Bedrock, Google Cloud and Microsoft Foundry through OIDC federation instead of stored keys. It also requires the triggering user to have write access and rejects bot actors unless listed in `allowed_bots`.

Search other CI systems too. GitLab CI, Jenkins and Azure Pipelines store secrets in their own variable stores, so check variable names as well as pipeline files. For agents in application code rather than pipelines, see [how to find AI agents in your code repositories](/blog/find-ai-agents-in-source-code).

## How do you find AI apps and coding agents?

Workflow files do not show everything. Also check:

- **Installed GitHub Apps** at organisation level, with their permissions. AI apps often request Contents, Issues, Pull requests and Workflows write access. Claude's GitHub app, for example, requests read and write on Actions, Contents, Issues, Pull requests and Workflows.
- **Copilot coding agent settings** at enterprise, organisation and repository level, including who can assign issues to it.
- **Repository settings for agent PRs.** By default, GitHub Actions workflows on Copilot coding agent pull requests do not run until a human approves them. Since March 2026, repository admins can turn on a setting to skip that approval. Inventory which repositories have done so.

For activity after discovery, see [visibility of GitHub Copilot coding agent activity](/blog/visibility-of-github-copilot-coding-agent-activity).

## How do you stop new AI actions appearing unreviewed?

GitHub's [enterprise policies for GitHub Actions](https://docs.github.com/en/enterprise-cloud@latest/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise) give you the controls:

1. Choose **Allow enterprise, and select non-enterprise, actions and reusable workflows**.
2. Under that, use **Allow or block specified actions and reusable workflows** to list approved AI actions.
3. Turn on **Require actions to be pinned to a full-length commit SHA**, so an approved action cannot change under you.
4. For private repositories, keep **Require approval for fork pull request workflows** on.

Remember that `pull_request_target` workflows on the base branch run regardless of approval settings. Treat any AI action on that trigger as high risk.

## What should you record?

For each pipeline agent: repository, workflow file, trigger, model provider, credential type (stored key, OAuth token or OIDC federation), permissions granted, and owner. Stored keys found here should be checked against your [leaked and unused LLM API keys](/blog/find-leaked-and-unused-llm-api-keys) review.

## How Opencontroller does this

Opencontroller auto-discovers models and API keys across AWS, Azure and Google Cloud and supports agent workload identity federation, which helps replace stored model keys in pipelines. Opencontroller Edge covers coding agents, skills and local MCP servers on developer devices. Pipeline agents can be recorded in the governed registry with owner and version. See the [capability reference](/capability-reference) or [book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**Do workflows run automatically on Copilot coding agent pull requests?**
Not by default. They wait for human approval. Since March 2026, repository admins can enable a setting that skips the approval.

**What is the quickest search to find AI in workflows?**
Search workflow files for model secret names such as ANTHROPIC_API_KEY and OPENAI_API_KEY, and for known AI actions in uses: lines.

**How do I stop unapproved AI actions?**
Use GitHub's allowed-actions policy to permit only listed actions and require pinning to a full commit SHA.

## Key facts

- AI agents in CI/CD appear as AI actions in workflows, platform coding agents, or custom scripts with model secrets.
- Search workflow files for model secret names (ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, OPENAI_API_KEY), AI actions in uses: lines, and comment triggers.
- GitHub Actions workflows on Copilot coding agent pull requests wait for human approval by default; since March 2026 repository admins can opt to skip it.
- GitHub enterprise policy can allow only specified actions and require pinning to a full-length commit SHA.
- Claude Code GitHub Actions supports Amazon Bedrock, Google Cloud and Microsoft Foundry through OIDC federation.
- Opencontroller supports agent workload identity federation and Opencontroller Edge covers coding agents on devices.

## Related

- [How do you find AI agents in your code repositories?](https://opencontroller.lyzr.com/blog/find-ai-agents-in-source-code.md)
- [How do you get visibility of GitHub Copilot coding agent activity across your organisation?](https://opencontroller.lyzr.com/blog/visibility-of-github-copilot-coding-agent-activity.md)
- [How do you find leaked or unused LLM API keys?](https://opencontroller.lyzr.com/blog/find-leaked-and-unused-llm-api-keys.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
