Traditional supply chain security controls assume that installation is necessary for infection. For tools like Claude Code and Cursor, simply opening a project can result in the execution of malicious code.
Case Study: Miasma Worm
In June 2026, an attacker compromised a contributor account and directly pushed a malicious commit to Azure/durabletask that delivered a credential harvester. This commit made no changes to the project's source code and used [skip ci] to avoid CI checks and backdated the changes by six years.
This worm introduced four different infection vectors:
- A Claude Code SessionStart hook
- A Gemini CLI hook
- A Cursor rule configured as "always apply"
- A VS Code task that will run on folder open
Of these four vectors, only the Cursor rule depends on prompt injection. The rest of these vectors can run automatically when the project is opened, depending on the tool and the user's trust choices. As a result of the incident, GitHub disabled 73 Microsoft repositories in 105 seconds, breaking CI/CD for anyone who depended on Azure/functions-action.
The Limitations of Trust Prompts
The security model for these projects depends on folder-trust prompts. Before any code is executed, a user is asked whether they trust the project contents, a selection that defaults to "yes".
The exact wording varies, ranging from generic (Claude Code and Copilot) to general MCP warnings (Cursor) to actually naming the MCP servers (Gemini). If the user accepts the prompt, the project-defined MCP server is launched automatically.
According to Adversa, the issue with these trust prompts is that they largely don't describe what the user is authorizing. Anthropic argues that accepting the prompt means that the user accepts the risk of malicious code within the project. As a result, users may blindly accept the risks without truly understanding them.
An Ongoing Problem
Miasma Worm is only one example where configuration files result in the execution of malicious code. Some previous examples include:
- Hidden Unicode in rules files that steered the agent to write backdoors into code. GitHub added a warning to inform the users of the risk, but this is treated as the user's responsibility.
- Config files executed before the trust prompt completes (CVE-2025-59536, CVE-2026-21852). Patched so that trust dialog completes before any execution.
- Prompt injection led an agent to rewrite its own settings to turn on YOLO mode (CVE-2025-53773). This vulnerability has been patched as well.
Redesigning Supply Chain Security for AI
With AI coding tools and IDEs, supply chain risks can exist at project open. Best practices for managing these risks include:
- Require code-owner review for .claude/, .gemini/, .cursor/, .vscode/tasks.json, and .mcp.json
- Alert when new commits add these files to a repo
- Require pull requests rather than allowing direct pushes to repos
- Open unknown repos in a container or virtual machine (VM)
- Never auto-approve the folder-trust prompt for a repo that you haven't reviewed
- Don't allow agents to edit their own configurations
- Implement zero trust access control to limit the scope of a compromise
- Treat a system and credentials as compromised after opening an affected project
Educational content, not legal, financial, investment, or professional security advice. Terms
New notes, roughly monthly per shift
No paywall, no membership tier — just an email when something new is published. Pick which shifts you care about.
We'll email you a link to confirm — you're only subscribed once you click it. Unsubscribe anytime. Privacy Policy