What matters in AI.

Subscribe

A free tool for coding agents finds 1.6% of attacks in one test

The tool finds all attacks that use the phrase "ignore all previous instructions" and almost none that do not.

A developer made injection-guard, a free tool for coding agents such as Claude Code and Codex. It is one Python file that uses no network. It reads the result of a tool and tells the agent about text that tries to give instructions. On one test, it finds only 1.6% of attacker instructions that do not use the phrase “ignore all previous instructions”. The developer also names the attacks that it does not find.

How it works

After each use of a tool, the tool reads the result, for example a web page or a file. It tells the agent about text that gives an instruction. It does not stop the agent. Before each shell command, it stops one known type of download that starts the code.

The numbers

On the InjecAgent test, it finds 1.6% of attacker instructions that do not use the phrase. It finds 100% when they use it. It finds no attacks in the German half of a different test, because its patterns use English only. On 86,400 tool results from one person, 16 alerts stay in 85 days.

What is not known

The developer names many other shell commands that get through. An attacker can also put the attack in a quotation to go through. The developer gives only counts from the sessions. No one can check the data.

Insight: Pattern checks find the phrase, not the intent

The tool finds 1.6% of attacks that do not use the phrase and 100% when they do. A related test of a guardrails proxy reports recall up from 25.0% to 94.5%. Granite preview models use tags that show which text is data. This reads as a difference between checks on text patterns and models that mark data. Look at which type gets more use.

Sources

  1. Zazel-pixel/injection-guard: A small, dependency-free prompt-injection guard for coding-agent hooks (Claude Code, Codex), measured on public datasets and real sessions.github.com
AI MATTER · NEWS · AI MATTER · NEWS ·29 NOV2026

Posted

Tags

Learn the terms in this story

Guides for this story

More in Security

All Security news