Skip to content
Beta
All articles

Hidden prompt injection on GitHub: what a scan of 145 million items found

Radware counted hidden text aimed at AI agents in GitHub issues and pull requests. Attacks are rare and targeted; the bigger risk is your own markers.

By The SpanDock team

6 min read

A diagram of the scan funnel from 143 million GitHub issues, pull requests and comments down to 2,281 AI-directed findings, split into projects coordinating their own agents, reviewer settings, defensive notes and 43 attacks

Prompt injection against coding agents on GitHub is usually discussed as a possibility. On 5 November 2026 Radware published a measurement. Its researchers scanned about 145 million GitHub items for text that people can't see but AI agents read, and sorted what they found. The headline is not that attacks are everywhere: they are rare. It is that they are aimed at maintainers' own bots, and that the fastest-growing kind of hidden text is projects talking to their own agents, in a channel anyone can write to.

This article walks through the numbers, what they do and don't show, and the changes that follow for teams running triage, review or CI agents on repositories that accept outside input.

What Radware measured

The study looked only for hidden text, because phrase searches such as "ignore previous instructions" produced mostly false positives (116 of the first 123 hits, by Radware's count). The four hiding techniques it searched for were HTML comments, invisible Unicode (tag characters, zero-width runs and variation selectors), CSS hiding in READMEs, and LaTeX text coloured to match the page background. Every hidden region went through two model-based classifiers and then manual review.

The scope covered every new issue and pull request on GitHub from June to September 2026, a further year of activity sampled from GH Archive, and the READMEs of the two million most-starred repositories. For issues, pull requests and comments, the funnel was:

StepItems
Scanned143 million
Containing hidden text4.9 million (3.4%)
Kept after both classifiers13,141
After removing text from the repository's own templates5,251
AI-directed findings after manual review2,281 (about 16 per million)

Radware stresses that every figure is a lower bound: visible injections were out of scope. It also notes that GH Archive now captures only about 2% of GitHub's issue volume, and that almost half of one category sat in comments, which only that sample covers.

Attacks: rare, but they read your workflow first

Radware counted 47 attacks: 43 in issues, pull requests and comments, about one in 3.3 million items, and 4 in READMEs. It left out 11 probes that openly declared themselves to be security tests.

The detail matters more than the count. Of the 43:

  • 56% targeted a triage, review or CI agent belonging to the project itself.
  • 44% hit well-known projects, including repositories from large AI and developer-tool vendors.
  • 21% named the victim bot's own tools or output fields, such as a shell tool or a gate field like allow_triage. The attacker had read the project's automation before writing the issue.

By goal, 44% tried to steal the bot's secrets (typically by asking it to print environment variables or send a token to a request-capture service), 37% tried to hijack the agent into doing other work, and 19% tried to forge the bot's verdict, for example by asserting that an issue had already passed a security gate.

The forged-verdict case is the one to remember. A model's output such as "gate passed" is text the attacker can influence. If that output alone opens a gate, the gate is only as strong as the model's resistance on that day.

Most hidden text is friendly, and that is the new risk

The largest group, 1,519 findings in 178 projects, was projects coordinating their own agents through hidden comments: agents claiming tasks, workflows telling the project's AI reviewer what to do, maintainers leaving notes for their bots. Another 374 findings configured AI reviewers (language, tone, format). Defensive notes, such as asking agents not to edit the human-written part of a pull request description, were a smaller group. Radware gives two different counts for that group, 345 in its summary and 313 in the body of the post, so treat the exact figure with care.

This traffic is growing quickly. In Radware's crawl the overall rate rose from 7.0 findings per million new issues and pull requests in June to 15.4 in September, while GitHub itself grew 55%. Projects coordinating their own agents grew fivefold, from 1.9 to 10.1 per million, and from 11 projects to 69.

The problem is that a hidden marker is still plain text in a public thread. Anyone can post the same marker. Radware found 47 markers in 10 projects that approve something or bypass a check, and says it has not yet seen one forged. Those are exactly the markers an attacker would copy first.

What the numbers don't tell you

A few limits are worth keeping in view:

  • Prevalence is not exposure. One attack in 3.3 million items says little about the risk to a specific repository whose bot holds a write token and a repository secret. The study shows that attackers pick targets.
  • Hidden text only. A visible injection in an issue body is out of scope, so the true volume is higher.
  • Classifier and reviewer judgement. The final labels come from manual review. Radware has published its detector, classifier prompts, findings and the script that recomputes its numbers in its research repository, which makes the work checkable.

Filtering hidden text is a trade-off

One obvious response is to strip hidden text before an agent sees it. GitHub already does this for its own cloud agent: its risks and mitigations page says GitHub "filters hidden characters before passing user input to Copilot cloud agent", and that HTML comments in issues and pull request comments are not passed to it. The same page says only users with write access can trigger the agent, and comments from users without write access are never presented to it.

Radware's point is that a blanket filter also removes the markers a project's own workflows rely on. Its recommendation is to filter by author, not by format: keep hidden text written by your team and bots, strip what outsiders write, and alert on hidden text that matches neither your templates nor your known markers.

What it means for engineering and security leaders

The study supports a simple model. An agent that reads public issues is reading attacker-controlled input, and whatever the agent can reach is what a successful injection gets. Three consequences follow:

  1. Privilege decides the outcome. A labelling bot needs to read issues and add labels. It does not need a token that pushes code, edits workflows or merges. GitHub's secure use reference for Actions already recommends least-privilege GITHUB_TOKEN permissions and care with untrusted input; agents make that advice more urgent, not different.
  2. Agent markers are an authorisation mechanism. If a hidden comment can claim a task, approve a change or skip a check, it needs the same author check as any other permission. Radware suggests using the commenter's role in the repository (GitHub reports it as author_association) or an allowlist.
  3. Security decisions need a check the model can't write. A label only maintainers can set, a check status or a protected field is harder to forge than a sentence in a comment.

Practical takeaways

  • List every workflow where an agent reads issues, pull requests or comments from people outside the organisation, and the token permissions and secrets each one has.
  • Remove secrets and write permissions from those jobs unless the task needs them. Set permissions: explicitly rather than relying on defaults.
  • Find the hidden markers your own bots read, and make each one check its author before acting.
  • Replace any marker that grants something, such as an approval or a task claim, with a label, status or field only maintainers can set.
  • Before you add a hidden-text filter, measure what your project already relies on. Radware's released scanner is one way to do that.
  • Treat model output that says "approved" or "passed" as a suggestion, and keep the real gate in code or in branch protection.

For how instruction files in an unmerged pull request can steer the same kind of bot, see our article on the GitInject study. For why a low injection success rate is not the same as safety, see what a low prompt-injection success rate doesn't tell you.

Sources

  1. Radware: Who Is Prompt-Injecting Coding Agents? (5 November 2026)
  2. Radware research repository: github-ipi-in-the-wild
  3. GitHub Docs: Risks and mitigations for GitHub Copilot cloud agent
  4. GitHub Docs: Secure use reference for GitHub Actions
Cookie categories

Details: Cookie Policy.