IncidentCoding assistants
Coding agents in GitHub Actions: one public issue to stolen CI secrets
CriticalAnthropicGoogleOpenAI
At Black Hat USA 2026, Novee Security showed that anyone able to open a GitHub issue could take over the official GitHub Actions setups for Claude Code, Gemini CLI and Codex. Hidden instructions in the issue made the agent run commands or leak the workflow's secrets, even on the vendors' own repositories.
Replay the attack step by step in the Learning Center
How it happened
- The attacker opens a public GitHub issue that contains instructions aimed at the AI agent.
- The workflow hands the issue to the coding agent, which runs with repository secrets such as the model API key and GITHUB_TOKEN.
- Claude Code: a crafted git push flag slipped past the command validator, and a later round leaked the API key one character at a time through a pre-approved domain.
- Gemini CLI: in headless mode the workspace was trusted automatically and an allowlist entry acted as a wildcard, so any command ran and a write-capable token was exposed.
- Codex: the first agent pass was tricked into writing an AGENTS.md file, which the second pass then loaded as trusted instructions.
Impact
Anyone could steal CI secrets or plant code, and every project that copied these default workflows shared the exposure.
The fix
All three vendors patched before the talk: Claude Code 2.1.163 fixes CVE-2026-54316, Google changed Gemini CLI's headless trust model, and OpenAI split the Codex workflow into separate jobs and documents AGENTS.md as untrusted input.
Lessons
- Treat every issue, pull request and comment an agent reads as attacker-controlled input.
- Give CI agents only the tools and token scopes they need, and keep untrusted triage apart from privileged jobs.
- Command validators and allowlists get bypassed: plan for what a hijacked agent could do with its permissions.