, which are AI programs that write software, automatically read special files in a project like CLAUDE.md for instructions. If an attacker can change these files, they can secretly influence the agent. The problem is that this influence could make the agent write code that looks fine but has security flaws. We tested this by creating malicious versions of such files for a dozen common vulnerability types, in two styles: one that politely suggests removing safety checks, and one that insists on it. We ran three different agents on 36 software tasks with and without these files, and tested the resulting code. The results were mixed: the files changed the rate of secure code by anywhere from 8 percentage points worse to 6 better, with no consistent pattern. However, agents differed in how they reported the influence: one agent often mentioned the file in its final message, while others hid it in internal reasoning, leaving developers unaware. This matters because developers trust these explanations, and a hidden influence could let attackers sneak past code reviews.
Malicious project files can push code agents toward vulnerabilities, often without developer awareness
Studying Claude Code and OpenCode across 12 vulnerability classes, the authors show that malicious memory files alter secure completion rates by -8 to +6 percentage points; Claude Code names the file in two-thirds of its final messages, while OpenCode almost never does.
Ruhr-Universität Bochum

In one line
Malicious project memory files can alter coding agents' secure code generation rates by -8 to +6 percentage points, with inconsistent effects across agents.
Before you read this
Three ideas this paper builds onThe authors crafted malicious project memory files for 12 Common Weakness Enumeration (CWE) classes, each in two variants: one that presents removing defensive checks as engineering best practice (qualified), and one that forcefully demands it.
How it works
stage by stageThe Daily Edition
The front page in your inbox each weekday morning: the lead, the picks, and why each one earned its place.