Comment and Control: Claude Code Security Review, Gemini CLI Action and GitHub Copilot Agent hijacked through GitHub comments
Pull-request titles, issue bodies and comments can make three AI agents on GitHub Actions run commands and leak the repository's secrets. All three vendors confirmed the findings.
Description
On 2026-04-15 security researcher Aonan Guan, with Zhengyu Liu and Gavin Zhong of Johns Hopkins University, published "Comment and Control", a prompt injection method against AI agents that run in GitHub Actions. Text that an outside contributor controls (a pull-request title, an issue body, an issue comment, a hidden HTML comment) is read by the agent as instructions. The write-up shows the method against three agents: Anthropic's Claude Code Security Review (a crafted PR title makes the agent run commands and reveal credentials), Google's Gemini CLI Action (an API key obtained through issue comments) and GitHub Copilot Agent (a payload hidden in an HTML comment scans for secrets and gets past the network firewall; here the victim must first assign the issue to Copilot). SecurityWeek reports that the findings were sent to Anthropic, Google and GitHub, that all three confirmed them, and that bounties of $100, $1,337 and $500 were paid; GitHub classed the issue as a known architectural limitation. The sources report no use of the method outside the researchers' own tests.
Exhibited failure modes
- Security vulnerability — Insecure patterns, injection flaws, weak cryptography, secret leakage.
- Context pollution — Trajectory drift, hallucination spirals, overlong or off-task context.
Affected systems
- Claude Code Security Review (GitHub Action)
- Google Gemini CLI Action
- GitHub Copilot Agent
Mitigated by
- Guardrails AI — Output validation framework with a catalog of validators and reask-on-failure loops.
- NeMo Guardrails — Colang-based programmable guardrails for LLM applications.
Sources
Notes
A vulnerability disclosure with proofs of concept, confirmed by the vendors; harm_class is "user_reported" because no compromise outside the tests is reported. Corrected on 2026-11-21 from the two sources. Until then this record merged three separate disclosures into one "July 2025 study led by Aonan Guan and Orca Security", dated 2025-07-15, nine months before its main source. The other two are different work and are not described here: Pillar Security's "Rules File Backdoor" (hidden instructions in rules files used by Cursor and GitHub Copilot, published 2025-03-18, https://www.pillar.security/blog/new-vulnerability-in-github-copilot-and-cursor-how-hackers-can-weaponize-code-agents) and Orca Security's "RoguePilot" (a GitHub issue that prompt-injects Copilot in Codespaces and leaks a GITHUB_TOKEN, published 2026-02-16, https://orca.security/resources/blog/roguepilot-github-copilot-vulnerability/). The id says 2025 because ids are not changed once published. The listed tools would not have fully prevented the attack; prompt-injection defences are partial.