The Error Message Decides: Repository Prompt Injection Against Coding Agents
Attackers have begun to plant instructions for AI coding agents in repositories, in the instruction files such agents read automatically. We place one malicious command (pipe a remote script into the shell, or send the developer's cloud credentials and SSH key to an outside server) in one of four files of small fictional repositories and let three open-weight coding agents fix a failing test. On its own the planted sentence was almost always ignored: the agent ran the command in 3 % of runs. When the repository's test setup also printed an error that pointed to "the setup step described in the repository docs", the share rose to 53 %, from every file location, including the README of a vendored package (43 %). The agents sent the credentials in 26 % of these runs. None of the 105 runs that executed the command warned the user. An injection does not need to be persuasive; it needs the environment to agree with it.
Authors
- Héctor Pío-Rendón Gutmann
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-11-19
- DOI
- https://doi.org/10.5281/zenodo.24377456
- Primary Topic
- Software Engineering Research
- Type
- preprint