Your AI agent’s config is now the payload: How attackers are targeting the developer agent harness
Attackers have shifted from hiding from AI tools to running inside them. By poisoning the config files that govern AI coding assistants, a new worm class achieves silent persistence, evades AI-based scanners, and spreads across an organization's repositories through developers' own tools. Key takeaways AI coding assistant configuration files, such as settings.json hooks, .cursorrules Cursor MDC rules, and similar harness files, are now explicit targets in supply-chain attacks, not collateral damage. These files simultaneously sit at the intersection of three trust relationships: The developer trusts them as config, the integrated development environment (IDE) executes them automatically, and the large language model (LLM) treats them as authoritative instructions, making them a uniquely powerful persistence vector. Defenders should treat harness config files as code that requires mandatory reviews and hash pinning in the CI/CD pipeline; enforce --ignore-scripts on package installs; and flag AI scanner refusals as a suspicious signal rather than a clean result. While analyzing a recent Mini Shai-Hulud campaign and its other variants, Tenable made a discovery: The payload wasn’t just stealing tokens and exfiltrating credentials. It was rewriting the configuration files that tell AI coding assistants what to do every time a developer opens a project. The Mini Shai-Hulud worm, which targets npm, PyPI, and other third-party registries simultaneously, includes a dedicated module that scans the developer’s home directory for configuration files belonging to AI coding tools by name, such as Anthropic’s Claude Code, Google’s Gemini CLI, Microsoft’s GitHub Copilot, SpaceX’s Cursor, OpenAI’s ChatGPT Codex, Cline’s eponymous tool, the open-source tool Aider, and others. For each one it finds, it injects a hook command which helps the malware stay persistent. From that point forward, every time the developer starts an AI coding session, the malware runs silently and automatically, and with the same level of trust the developer placed in their own tools. This is a deliberate architectural choice: The attacker modeled the execution environment, identified the highest-privilege auto-run mechanism available on a developer’s machine, and built the attack specifically for it. Supply-chain attacks used to end at credential theft. Now the AI agent’s harness is both the target and the propagation vector. Why AI agent harness files are a uniquely attractive target For years, defenders have focused supply-chain security on the package itself: Inspect the preinstall script, scan the tarball, verify the checksum. That model assumes the malicious payload lives only inside the installed artifact. The threat described here breaks that assumption: The payload lands in a completely different place. AI coding assistants’ configuration files occupy a structural position unlike any other file in a developer’s working environment. They are simultaneously trusted as developer configuration, so they survive aggressive code reviews focused on business logic; are executed automatically by the IDE, so no user interaction is required after initial compromise; and are treated as authoritative instructions by the AI model itself, so the LLM will act on their content without prompting the user. No other file class has all three properties at once. A malicious package.json script requires execution. A malicious comment in source code requires a developer to act on it. A malicious hook in .claude/settings.json runs every time the developer opens a session. The attack surface is also nearly invisible to conventional scanning. These files are small, structured, and look identical to legitimate developer config. A poisoned settings.json with a malicious SessionStart hook has the same schema and structure as a clean one; the only difference is what the command field points to. Meanwhile, the files are rarely subject to the same review discipline as production code. They live…
AI Analysis
Technical Summary
This threat involves malware that targets AI coding assistant configuration files such as settings.json hooks and Cursor MDC rules, which are automatically executed by IDEs and treated as authoritative instructions by large language models. The Mini Shai-Hulud worm scans developer environments for these config files belonging to various AI coding tools (including Anthropic Claude Code, Google Gemini CLI, GitHub Copilot, SpaceX Cursor, OpenAI ChatGPT Codex, and others) and injects malicious hooks to achieve silent persistence. Unlike traditional supply-chain attacks that focus on malicious package contents, this attack vector exploits the trusted config files that survive code reviews and run automatically without user interaction. This allows the malware to evade AI-based scanners and spread across repositories through developers' own tools. The attack surface is nearly invisible to conventional scanning because the poisoned config files maintain legitimate schema and structure, differing only in the commands they execute. This represents a deliberate architectural choice by attackers to leverage the highest-privilege auto-run mechanisms in developer environments, making AI agent harness files a uniquely powerful persistence and propagation vector.
Potential Impact
The malware achieves silent persistence on developer machines by injecting malicious hooks into AI coding assistant configuration files, which are automatically executed by IDEs and trusted by AI models. This allows the attacker to run code with the same trust level as the developer's tools without requiring user interaction. The attack bypasses traditional supply-chain security measures focused on package contents, evades AI-based scanning, and spreads across an organization's repositories via developers' own AI coding assistants. This can lead to credential theft, token exfiltration, and widespread compromise of development environments and codebases.
Mitigation Recommendations
There is no specific patch available as this attack targets configuration files rather than software vulnerabilities. Defenders should treat AI coding assistant harness config files as executable code requiring mandatory code reviews and implement hash pinning for these files in the CI/CD pipeline. Enforce the use of --ignore-scripts on package installations to prevent automatic script execution. Additionally, treat refusals from AI-based scanners as suspicious signals rather than clean results. These measures help detect and prevent malicious modifications to AI assistant config files and reduce the risk of silent persistence and propagation.
Your AI agent’s config is now the payload: How attackers are targeting the developer agent harness
Description
Attackers have shifted from hiding from AI tools to running inside them. By poisoning the config files that govern AI coding assistants, a new worm class achieves silent persistence, evades AI-based scanners, and spreads across an organization's repositories through developers' own tools. Key takeaways AI coding assistant configuration files, such as settings.json hooks, .cursorrules Cursor MDC rules, and similar harness files, are now explicit targets in supply-chain attacks, not collateral damage. These files simultaneously sit at the intersection of three trust relationships: The developer trusts them as config, the integrated development environment (IDE) executes them automatically, and the large language model (LLM) treats them as authoritative instructions, making them a uniquely powerful persistence vector. Defenders should treat harness config files as code that requires mandatory reviews and hash pinning in the CI/CD pipeline; enforce --ignore-scripts on package installs; and flag AI scanner refusals as a suspicious signal rather than a clean result. While analyzing a recent Mini Shai-Hulud campaign and its other variants, Tenable made a discovery: The payload wasn’t just stealing tokens and exfiltrating credentials. It was rewriting the configuration files that tell AI coding assistants what to do every time a developer opens a project. The Mini Shai-Hulud worm, which targets npm, PyPI, and other third-party registries simultaneously, includes a dedicated module that scans the developer’s home directory for configuration files belonging to AI coding tools by name, such as Anthropic’s Claude Code, Google’s Gemini CLI, Microsoft’s GitHub Copilot, SpaceX’s Cursor, OpenAI’s ChatGPT Codex, Cline’s eponymous tool, the open-source tool Aider, and others. For each one it finds, it injects a hook command which helps the malware stay persistent. From that point forward, every time the developer starts an AI coding session, the malware runs silently and automatically, and with the same level of trust the developer placed in their own tools. This is a deliberate architectural choice: The attacker modeled the execution environment, identified the highest-privilege auto-run mechanism available on a developer’s machine, and built the attack specifically for it. Supply-chain attacks used to end at credential theft. Now the AI agent’s harness is both the target and the propagation vector. Why AI agent harness files are a uniquely attractive target For years, defenders have focused supply-chain security on the package itself: Inspect the preinstall script, scan the tarball, verify the checksum. That model assumes the malicious payload lives only inside the installed artifact. The threat described here breaks that assumption: The payload lands in a completely different place. AI coding assistants’ configuration files occupy a structural position unlike any other file in a developer’s working environment. They are simultaneously trusted as developer configuration, so they survive aggressive code reviews focused on business logic; are executed automatically by the IDE, so no user interaction is required after initial compromise; and are treated as authoritative instructions by the AI model itself, so the LLM will act on their content without prompting the user. No other file class has all three properties at once. A malicious package.json script requires execution. A malicious comment in source code requires a developer to act on it. A malicious hook in .claude/settings.json runs every time the developer opens a session. The attack surface is also nearly invisible to conventional scanning. These files are small, structured, and look identical to legitimate developer config. A poisoned settings.json with a malicious SessionStart hook has the same schema and structure as a clean one; the only difference is what the command field points to. Meanwhile, the files are rarely subject to the same review discipline as production code. They live…
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
This threat involves malware that targets AI coding assistant configuration files such as settings.json hooks and Cursor MDC rules, which are automatically executed by IDEs and treated as authoritative instructions by large language models. The Mini Shai-Hulud worm scans developer environments for these config files belonging to various AI coding tools (including Anthropic Claude Code, Google Gemini CLI, GitHub Copilot, SpaceX Cursor, OpenAI ChatGPT Codex, and others) and injects malicious hooks to achieve silent persistence. Unlike traditional supply-chain attacks that focus on malicious package contents, this attack vector exploits the trusted config files that survive code reviews and run automatically without user interaction. This allows the malware to evade AI-based scanners and spread across repositories through developers' own tools. The attack surface is nearly invisible to conventional scanning because the poisoned config files maintain legitimate schema and structure, differing only in the commands they execute. This represents a deliberate architectural choice by attackers to leverage the highest-privilege auto-run mechanisms in developer environments, making AI agent harness files a uniquely powerful persistence and propagation vector.
Potential Impact
The malware achieves silent persistence on developer machines by injecting malicious hooks into AI coding assistant configuration files, which are automatically executed by IDEs and trusted by AI models. This allows the attacker to run code with the same trust level as the developer's tools without requiring user interaction. The attack bypasses traditional supply-chain security measures focused on package contents, evades AI-based scanning, and spreads across an organization's repositories via developers' own AI coding assistants. This can lead to credential theft, token exfiltration, and widespread compromise of development environments and codebases.
Defensive Guidance
There is no specific patch available as this attack targets configuration files rather than software vulnerabilities. Defenders should treat AI coding assistant harness config files as executable code requiring mandatory code reviews and implement hash pinning for these files in the CI/CD pipeline. Enforce the use of --ignore-scripts on package installations to prevent automatic script execution. Additionally, treat refusals from AI-based scanners as suspicious signals rather than clean results. These measures help detect and prevent malicious modifications to AI assistant config files and reduce the risk of silent persistence and propagation.
Technical Details
- Article Source
- {"url":"https://www.tenable.com/blog/ai-coding-assistant-agent-harness-attacks","fetched":true,"fetchedAt":"2026-07-21T13:07:09.631Z","wordCount":3570}
- Classification
- {"confidence":0.74,"severitySource":"default","classifier":"rss-v2"}
Threat ID: 6a5f6efd2a4a8d59892950c2
Added to database: 07/21/2026, 13:07:09 UTC
Last enriched: 08/07/2026, 05:45:23 UTC
Last updated: 09/04/2026, 06:35:37 UTC
Views: 183
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.