How a Trusted Assistant Becomes a Trojan Horse
In one documented case, a threat actor compromised a SaaS provider and gained access to an active AI coding assistant session on a developer workstation. The assistant recommended installing an external package. The developer accepted. The package had already been poisoned.
What followed was systematic. The compromised package deployed an information stealer, harvested GitHub OAuth tokens, and propagated the Shai-Hulud worm across approximately 100 internal code repositories. Repository secrets were exfiltrated. Proprietary source code was stolen. The attacker then poisoned a package within the organisation’s own official namespace, infecting a second employee through what appeared to be a routine internal download.
The mechanism here is worth understanding precisely. The AI assistant was not itself compromised in the traditional sense. It was operating as intended — interpreting the developer’s environment and making suggestions. The attacker simply ensured that one of those suggestions led somewhere dangerous.
Agent Skills and MCP Servers Are the Next Frontier
The attack surface extends well beyond coding assistants. Mandiant’s research points to two additional vectors that are growing in exposure.
Reusable agent skills — packaged automation components that AI agents can call — are being weaponised. VirusTotal researchers observed the distribution of backdoors, droppers, information stealers, and remote-access tools disguised as legitimate OpenClaw AI agent skills. The packaging looks professional. The intent is not.
MCP servers represent a related risk. MCP servers act as structured interfaces between AI agents and external tools or data sources. Because they operate within the normal workflow of an AI platform, tampering with them can achieve remote code execution without triggering conventional security alerts. In one incident Mandiant investigated, an attacker poisoned an internal AI repository and modified the command-line hooks used by an assistant — gaining execution capability through what appeared to be standard platform behaviour.
The threat actor UNC6780, also tracked as TeamPCP, used more than half a dozen techniques across multiple supply-chain compromises, including prompt injection against AI coding assistants and LLM-based security scanners, credential theft for AI services, and exfiltration of proprietary AI data.
What Mandiant Recommends
The report’s recommendations are specific and actionable. They reflect a core principle: AI coding assistants, local plugins, and MCP servers should be treated as privileged development components, not low-risk productivity tools.
Key controls include:
- Digitally sign and verify AI assistant binaries, command-line helpers, plugins, and MCP servers before execution
- Apply strict code review and multi-party approval to any changes in internal agent skills or hooks
- Prevent extensions from accessing raw API keys or long-lived OAuth tokens directly
- Validate AI-recommended dependencies against approved lists and cryptographic hashes
- Route dependency downloads through controlled internal repositories, not directly from public registries
- Maintain a real-time inventory of AI applications, models, and endpoints, supported by automated software bills of materials (SBOMs) covering every build
For organisations deploying open-weight models, the challenge is compounded. Responsibility for verifying model provenance, training data, architecture, and components falls largely on the deploying organisation. Mandiant recommends cryptographic verification, bias testing, vulnerability assessments, and continuous monitoring for model drift.
The Structural Problem
The deeper issue is architectural. AI tools are being integrated into development workflows faster than security practices are being extended to cover them. The same pipelines that govern code — access controls, signing, dependency management, audit trails — need to apply to models, agent skills, data pipelines, and runtime infrastructure.
Knowing precisely which AI components are operating, and verifying their chain of custody from code to production, is not a future concern. Based on the incidents Mandiant has already responded to, it is a present one.
The Practical Takeaway for Teams Using AI Dev Tools
If your team uses AI Dev Tools, AI coding assistants, agent frameworks, or MCP-connected tools, the immediate question is not whether these tools are useful — they clearly are. The question is whether they are governed.
Start with inventory: do you know every AI plugin, MCP server, and agent skill currently active in your development environment? Then apply the same scrutiny to AI-recommended packages that you would apply to any third-party dependency. The attack surface has expanded. The controls need to expand with it.
Comments (0) No comments yet
Want to join this discussion? Login or Register.
No comments yet. Be the first to share your thoughts!