A lot of teams now run an AI agent inside GitHub Actions to label issues, summarize pull requests or suggest fixes. It reads text that strangers write, then it acts. That's the whole design, and it's also the problem.
Two cases this year show where that goes. In February, an AI triage workflow at Cline was turned into a path toward its publishing credentials. In November, researchers published how the same kind of workflow in the OpenAI Codex repository could be chained toward the repo's release pipeline. Both start with someone opening a GitHub issue.
The Codex chain, step by step
The researchers, a team at Depi Security, wrote it up in their own post, and it's also listed as a resolved Bugcrowd report, rated P1 with a $1,000 reward. As they describe it:
- Prompt injection. The issue-labeler workflow ran the Codex action with issue titles and bodies placed in the agent prompt, and was open to any user. Text in an issue could give the agent instructions, which gave command execution inside the runner.
- Sandbox escape. The agent's sandbox blocked network connections but not opening files. The researchers used debug pipes of the runner process in
/tmpto read that process's memory. - Token leak. That memory held
ACTIONS_RUNTIME_TOKENandGITHUB_TOKEN. - Cache poisoning. The Actions cache is shared. With the runtime token, they describe writing a poisoned entry that a more privileged workflow,
rust-ci.yml, would restore and run. - Pivot. That workflow had
contents: write. From there they describe planting a persistent workflow with id-token permission.
Now the caveats, because this story gets stretched. The researchers say the chain was capable of publishing a malicious release, and they note the package gets roughly 10 million weekly npm downloads. Their own write-up does not show a publish. The final steps are described, not demonstrated, and I found no report of a malicious Codex release. The Bugcrowd page says the issue was accepted and fixed, without saying how. So treat it as a serious path that was closed, not a breach that happened. The researchers also say there is no patch for users to apply.
Cline: the version where it did happen
The Cline case is the one with real fallout. Security researcher Adnan Khan disclosed it on February 9. A crafted issue title was interpolated into a Claude prompt in the triage workflow, and the agent had shell access. From there the route ran through the Actions cache toward the nightly publish workflows and their tokens.
Khan says someone else found his proof of concept and used it against Cline's real repository. On February 17 an unauthorized Cline CLI 2.3.0 went to npm with a postinstall script that installed another package. Cline says the CLI binary itself was identical to the previous version. Khan says a publish token was not fully revoked during the first rotation. So the lesson there is partly about rotation: cleaning up after an exposure means every token, not most of them.
What to check in your own workflows
Open .github/workflows and look for anything that feeds issue text, PR titles, comments or branch names into an AI action. Then:
- Restrict who can trigger it. The Codex workflow was open to any user. If the agent runs on text from anyone on the internet, assume the text is hostile.
- Give the agent nothing to steal. Set
permissions:to the minimum, usually read-only, on the job that runs the agent. No publish tokens, no cloud role, no long-lived secrets in that job. - Don't give it a shell if it only needs to label. A labeler needs to output a label name. It does not need Bash.
- Turn off cache access for agent jobs. GitHub added a
cache-modesetting in September. Per Socket's write-up, its values areread,write,write-onlyandnone, and GitHub recommendsnonefor AI agent workflows. Also keepactions/cacheout of any workflow that holds publish credentials, which is the fix Cline made. - Separate the release path. Nightly or test workflows shouldn't hold tokens with the same power as production releases. Khan flagged exactly that at Cline.
- Know your rotation list. If you ever suspect exposure, you need a list of every token in play, including bot and provider tokens, so none gets missed.
If you use AI coding tools elsewhere in your pipeline, our post on holes AI coding tools leave behind and the one on secret scanning cover the neighboring problems.
Is a pen test the right tool?
Not for this. An external test looks at what your servers expose to the internet. A GitHub Actions workflow lives in your repo, and a prompt injection in an issue is a CI configuration review, not something I can find by scanning your site. Read your workflow files, and treat each one that consumes outside text like an internet-facing service. It is one.