Modern agentic coding frameworks often rely on community-shared rule files—like AGENTS.md or .cursorrules—to shape how autonomous agents generate code. According to a new arXiv paper, this growing dependency creates a largely unexamined security surface: because these rule files are treated as trusted guidance, they may be a prime vector for attack.
The paper focuses on "package hallucination attacks" delivered through prompt injection. In this scenario, an attacker embeds malicious instructions inside a rule file that a coding agent later reads. The agent, following the injected instructions, may then hallucinate and import a package name chosen by the attacker—potentially leading to the installation of a malicious dependency.
The authors describe the risks of this pipeline as "underexplored," suggesting that the security implications of rule-file-driven code generation have not received enough attention. The abstract positions the work as a step toward bridging that gap, though the available text stops short of detailing specific attack demonstrations or mitigations.