Who Is Prompt-Injecting Coding Agents? An Empirical Study of Hidden AI-Directed Text on GitHub
Abstract
AI coding agents now triage issues, review pull requests and pick up tasks inside GitHub repositories, and to do so they read text that anyone with a GitHub account can write. This makes GitHub a prime surface for indirect prompt injection, in which instructions embedded in untrusted content steer a model that later processes it. Prior work has demonstrated such attacks against agents on GitHub in controlled settings, but how often they occur in practice, who deploys them, and for what purpose remain unknown. We present the first large-scale empirical study of AI-directed hidden text on GitHub. We analyzed roughly 145 million issues, pull requests, comments and README files, detected text that GitHub does not render to a human reader but that an agent receives in full, and filtered it with a two-stage LLM classification, a template provenance check and an exhaustive manual review. We identify 2,281 validated findings in issues, pull requests and comments (16 per million items), and AI-directed hidden text in the READMEs of 107 repositories. We find a heterogeneous ecosystem of four uses: attacks on other parties' agents, defensive text that restricts agents, content override that steers what they write, and first-party orchestration, in which projects coordinate their own agents through hidden markers. Attacks are rare (about one in 3.3 million items) but aimed at maintainers' own triage, review and CI agents. Orchestration accounts for two thirds of the findings in issues, pull requests and comments, grew fivefold in four months, and forms a control channel that anyone who can comment can imitate. Replayed offline against five models we tested, the attacks succeed against one small, fast model in 19% of cases, and against none once HTML comments are stripped. We release our detection tool and every finding.
Create a lesson
Related papers
Benchmarking Web Agent Defenses Against Adaptive Visual Prompt Injection
Shared title terminology · Haichuan Zhang, Zhiyuan Zhong, Shih-Chieh Dai et al.
PIPETTE: Prompt Injection Purple-Teaming for Robust LLM Agents
Shared title terminology · Lipeng He, Yihan Wang, Jiawen Zhang et al.
AutoPI: Taxonomy-Guided Adaptive Red Teaming for Prompt Injection in LLM Agents
Shared title terminology · Stavros Damianakis, Konstantinos Psounis
What Survives the Shift from Text to Pixels? Conditional Protection against Prompt Injection in Image-Rendered Documents
Shared title terminology · Haoyang Liu, Yinong Xu, Zhe Lang et al.
ParseGap: Testing What Coding Agents Authorize and What Shells Execute
Shared title terminology · Jieyu Li
Who Grades the Agent? Privilege Separation for Coding-Agent Benchmarks
Shared title terminology · Nathan Nour Houlamy, Mattia Favretto, Earlence Fernandes et al.