Keep AI agents in CI from holding write tokens with no brakes
Coding agents now run in GitHub Actions to triage issues, review pull requests, and push fixes. When untrusted input triggers the job and the token can write, an attacker's comment becomes the agent's instructions.
Team: 7 days free, then $199 a month per organization. Cancel any time. Compare plans →
Untrusted triggers plus write tokens
A workflow triggered by issue_comment runs on text anyone can write. With no permissions block, the job's token gets whatever the repository default grants, which can include write access to contents and pull requests.
Skipping the agent's permission prompts in CI removes the last check. The agent then does whatever the injected text says, with the token's access to your code and, through id-token, your cloud.
on:
issue_comment:
types: [created]
jobs:
agent:
- permissions:
- contents: read
steps:
- uses: anthropics/claude-code-action@v1
policy.overprivileged-agent-workflowHighThis change runs Claude Code on issue_comment, untrusted input, with no permissions block, so its token is the repository default.
EXIT 1What ControlLoop reports
Write tokens without brakes
A workflow is reported when the agent holds a contents, pull-requests, or id-token write token and either skips its permission prompts or is triggered by untrusted input with no explicit permissions block.
Change, not just state
An added or changed over-privileged workflow is high severity. Workflows that already exist are reported as medium on the first scan.
The same gate as everything else
Workflow findings sit beside hook, permission, and MCP findings in one verdict, with the file and line behind each.
How it works
- 01
Find agent workflows
ControlLoop reads your CI workflows and recognizes the jobs that run coding agents.
- 02
Check trigger and token
Each job's trigger, permissions block, and prompt settings are compared with the approved baseline.
- 03
Block the risky change
A pull request that widens the token or removes the brakes is blocked before it merges.
Questions
Which CI systems are covered?
GitHub Actions workflows that run coding agents today. The gate itself runs in GitHub Actions, GitLab, Bitbucket, and Azure DevOps pipelines, or as hosted scans on Team.
What makes an input untrusted?
Triggers whose content outsiders can write, such as issue and pull-request comments. A job triggered that way should declare a minimal permissions block.
Does it check the GitHub token's real permissions?
It reads the workflow's declared permissions. When none are declared, it treats the token as the repository default and reports the risk, since that default is outside the pull request's control.
Go deeper
Read the guide: Claude Code hooks and permissions: what a pull request can grant an agent
More use cases
Catch the pull request that hands an agent your whole shell
A one-line settings change lets an agent run any command without asking. See it before it merges.
See how ControlLoop catches itStop a committed hook before it runs on every laptop
A new SessionStart hook runs on every machine that opens the repo. Review the command before it does.
See how ControlLoop catches itCatch an MCP server that changes behind the same name
postmark-mcp was clean for 15 releases, then it wasn't. Catch the version change before it ships.
See how ControlLoop catches itFind the agent that can read your data, take orders from strangers, and send it out
Sensitive data, untrusted input, and an outbound channel in one agent is a leak waiting for a prompt.
See how ControlLoop catches itShow your auditor what every agent could do, and who approved it
Every verdict, exception, and approver for an audit window, mapped to SOC 2 and ISO/IEC 42001.
See how ControlLoop catches itReview what a clone installs and runs before it merges
One line in devcontainer.json installs an extension and runs a command on every clone. Review it before it merges.
See how ControlLoop catches it