GitHub-scale measurement of indirect prompt injection of coding agents in the wild
AI coding agents now work on GitHub every day: they sort new issues, review pull requests and pick up tasks on their own. To do that they read text that anyone can write. Some of that text is hidden: invisible on GitHub's rendered page, but delivered in full to any agent that reads the raw Markdown.
This repository holds the results of a census of that hidden, AI-directed text across 145 million GitHub items, and ipi-scan, the tool that finds it. Use the tool to check your own repositories, or to extend the measurement to new data.
Research by Gabi Nakibly and Zvika Babo, Radware.
We scanned every new issue and pull request on GitHub from June 1 to September 30, 2026 (95.1 million items), issues, pull requests and comments from GH Archive for September 2025 to May 2026 plus comments for June to August 2026 (47.6 million items), and the READMEs of the 2 million most-starred repositories.
| Result | Value |
|---|---|
| Real AI-directed findings in issues, PRs and comments | 2,281, about 16 per million items |
| Attacks on AI agents | 47: 43 in issues, PRs and comments (about 1 in 3.3 million items) and 4 in READMEs |
| Projects leaving hidden instructions for their own agents | 1,519 findings in 178 projects |
| Growth, June to September 2026 (per million new issues and PRs) | 7.0 → 15.4, 2.2 times |
| Projects coordinating their own agents through hidden markers | 11 → 69, June to September 2026 |
| README files with real AI-directed hidden text | 106 of 2 million repositories |
| Share of classifier-confirmed items that were really issue/PR template text | 60% |
The 2,281 findings fall into four categories:
| Category | Findings | Meaning |
|---|---|---|
| First-party orchestration | 1,519 | A project leaving instructions or markers for its own AI agents or agent tooling |
| Content override | 374 | Steering what an agent writes, for the author's benefit (review language, attribution, promotion) |
| Defensive | 345 | Keeping agents away from parts of the work, making them identify themselves, or trapping them |
| Attack | 43 | Trying to make someone else's agent act against its owner: leak secrets, forge a verdict, run commands |
Three observations matter most for defenders:
Every number is a lower bound: we count only hidden text, and GH Archive now captures only a small share of GitHub's activity. See docs/methodology.md for how every number was produced.
data/
issues_prs/findings.jsonl the 2,281 findings in issues, PRs and comments
readmes/findings.jsonl the README findings (106 repositories)
tables/funnel.json every step from items scanned to findings
tables/monthly.csv findings and rates per month and dataset
README.md field-by-field description of the data
scripts/summarize.py recomputes every number above from the data files
docs/
methodology.md datasets, detection, classification, review and counting rules
ipiscan/ the scanning tool (Python package)
tests/ tests for the tool
data/issues_prs/findings.jsonl has one JSON object per finding: the item's URL, repository, surface (issue, pull request, comment, review), creation time, category, the hidden text the author wrote, the stage-2 classifier's objective and target, and a short note on how the finding was judged. Findings in the first-party orchestration category also record who reads the marker (an AI model, or agent tooling) and the basis for that decision. GitHub usernames are not included.
data/readmes/findings.jsonl has one object per distinct hidden snippet with the repositories that carry it. The tables summarise both.
A quick look with Python:
import json, collections
rows = [json.loads(line) for line in open("data/issues_prs/findings.jsonl", encoding="utf-8")]
print(collections.Counter(r["category"] for r in rows))
attacks = [r for r in rows if r["category"] == "attack"]
print(attacks[0]["url"], attacks[0]["hidden_text"][:200])
The full field list and the category definitions are in data/README.md. To recompute every number in this README from the data files, and verify the tables against them:
python scripts/summarize.py --check
ipi-scanipi-scan runs the same pipeline that produced the data:
<!-- ... -->), which carry almost all hidden text on those surfaces. For READMEs it also finds invisible Unicode (tag characters, zero-width runs, bidirectional overrides, variation selectors), white LaTeX and CSS-hidden elements. Text shown inside code blocks is visible, so it is ignored. Well-known machine markers left by GitHub apps are dropped..github repository) is marked as template text, because the item's author did not write it.The models only ever see the hidden text as data: it is wrapped in delimiters, forged delimiters are removed, and the prompts tell the model never to follow it. The prompts are in ipiscan/prompts.py.
Python 3.11 or later.
git clone https://github.com/rdwr-gabin/github-ipi-in-the-wild
cd github-ipi-in-the-wild
pip install -e ".[openai]" # or ".[anthropic]", or ".[all]" for both
Set the keys the tool reads from the environment:
| Variable | Needed for |
|---|---|
GITHUB_TOKEN | Reading GitHub. Any token works, including gh auth token. Without one GitHub allows only 60 requests an hour. |
OPENAI_API_KEY or ANTHROPIC_API_KEY | The two classification stages. Not needed with --detect-only. |
With OpenAI the stages default to gpt-5.6-luna and gpt-5.6-terra, the models behind the published results. With Anthropic they default to claude-haiku-5-5 and claude-sonnet-5-5. Choose explicitly with --provider, --stage1-model and --stage2-model.
Scan one repository (issues, PRs, comments and README):
ipi-scan repo OWNER/NAME
ipi-scan repo OWNER/NAME --since 2026-09-01 # only items created since a date
ipi-scan repo OWNER/NAME --detect-only # find hidden text, no model calls