Security
Your coding agent is an insider now
Two incidents and a week of enterprise releases point at the same shift: generating code is cheap, and verified action is the scarce resource.
On October 29, Cursor's extension marketplace served a tampered build of Anthropic's Claude Code extension for about eleven hours. Versions 2.1.312 and 2.1.313 carried a loader at the top of extension.js, ahead of the real code. It ran when the extension loaded — no conversation, no click. It collected the hostname, Git email and the names of your environment variables, appended an SSH key labeled svc-telemetry to authorized_keys, and opened a reverse tunnel to one IP, retrying every 60 seconds.
Cursor says at most 5,000 users received it, and that the SSH step likely failed on most machines for lack of admin rights. That is the comforting part. The postmortem two weeks later is not. The attacker did not break into Anthropic. They used an access key Cursor had issued to a third-party inference vendor, read a bucket of coding-agent traces the companies shared, and found unredacted credentials in them — then reached internal SaaS tools, and finally the credential that puts files in the marketplace cache.
The entry point was not the model, the extension, or Open VSX. It was a log nobody had scrubbed.
The transcript is the attack surface
Agent traces are the most sensitive artifact most teams now produce: prompts, file contents, command output, and whatever env vars a tool call printed. We treat them as debugging data — kept for months, shipped to observability vendors, shared with model providers for evals. Cursor puts the exposed API keys at under 0.01 percent of customers. A rounding error until it is your key, in a bucket, with no expiry.
The second vector is blunter. Bitdefender Labs found 22 malicious GitHub repositories on November 17, built to be opened by agents rather than people. The payload lives in the files agents read: AGENTS.md, CLAUDE.md, .cursorrules, .claude/settings.json, .mcp.json, .vscode/tasks.json, .github/copilot-instructions.md. Some tell the agent to run node scripts/setup.js at session start without reading it or showing output. Others skip persuasion: a session-start hook in .claude/settings.json runs in your shell once you trust the folder. The malware then hunts 14 assistants' config files and uses stolen GitHub tokens to commit the trap into up to 25 repositories.
There is nothing to patch here. An agent that follows the instruction file in its working directory is doing its job.
Cheap code, expensive trust
Satya Nadella put the economics plainly on The Pragmatic Engineer podcast on November 16: "In a world where code generation has become cheap, what has become hard is verification." He went further than most vendors will: treat agents as an insider risk, and keep audited, tamper-proof logs of how they reason.
He is right about the direction and understated about the cause. Agents are not dangerous because they reason badly. They are dangerous because we gave them credentials, network access and the authority to act, then measured success by output volume. An insider threat model is correct precisely because the agent is not malicious. It is obedient. Obedience plus credentials is the whole problem.
What actually worked at volume
Anthropic's account of how the Claude Code team reviews code, published October 15, is the most concrete public data on verification this year. Claude writes roughly 90 percent of Claude Code's code. Between June and September, merged pull requests more than doubled while the reverted share fell by more than 40 percent.
- tests, build and linters run before the PR; a subagent then reviews the diff in fresh context;
- several reviewer agents hunt bugs in parallel, and a separate group votes on each finding so only confirmed issues post;
- human approval scales with a risk tier set by the change, not the author — docs and flag-gated additions can merge with nobody, billing and CI always need two;
- an agent's approval never counts as a person's, and re-review stops at three rounds, then looks only at new changes.
Two numbers are worth stealing. About 59 percent of what the reviewer kept flagging was in the code at its first pass; the loop was finding old bugs, not new ones. One CLI pull request went more than fifty rounds overnight. After the caps, PRs passing in one round went from 65 to 78 percent, and those needing five or more fell from 8.9 to 1.5 percent.
These are Anthropic's own numbers, self-reported and not audited. The pattern still holds.
The control plane showed up this week
The missing layer started shipping.
Microsoft used Ignite to put identities on agents. Entra Agent ID, in preview, assigns a distinct identity to local agents that Defender and Global Secure Access discover on managed devices — 60 types, starting with Claude Code, OpenAI Codex and GitHub Copilot CLI. Agent activity becomes separable from the human's, and Conditional Access can evaluate policy at the moment of action and demand approval for sensitive calls. A lifecycle policy disables identities inactive for 60 days. Foundry agents can get a Microsoft 365 account with a named manager, and one control disables every agent built from its blueprint.
LangChain shipped another slice on November 19: LangSmith Tool Gateway, public beta — a managed layer between agent and MCP server, so the caller never holds the upstream token. Each call resolves to a credential owner — a user, the agent itself, or a shared profile for unattended jobs — then applies deny and approval policies. Two details matter: a tool kit controls what the agent sees, not what it may do; tools are allowed by default, with deny taking priority. Approvals come from the person in the MCP client, not a separate reviewer. Traces record tool, server, user, outcome and duration — not payloads. All vendor claims in beta, no independent evaluation. The shape is right.
What I would change on Monday
Give every agent its own identity. One identity means one blast radius, one audit trail, one thing to revoke.
Move approval to the action. Prompt-level "are you sure?" is theater; a file can talk the agent out of it. Gate the tool call — warehouse writes, merges to main and production deploys get a human.
Treat agent config files as code under review. AGENTS.md, CLAUDE.md, .mcp.json, .claude/settings.json and .vscode/tasks.json are executable inputs. Review them like a CI workflow, put them in CODEOWNERS, and ban agents from starting in ~/Downloads.
Scrub traces before you store them. Redact secrets at capture, set a retention window, know which vendors hold copies, and rotate anything that appeared in one.
The short version
- Generation is cheap; verification and attribution are the scarce resources. Budget for them.
- One identity per agent, least privilege, a kill switch.
- Approvals at the tool call, not in the prompt.
- Instruction files are executable. Pin extensions; uninstalling a bad one may not remove what it dropped.
- Measure reverts and incidents, not pull request counts.
- Prefer boring, auditable controls over "autonomous" anything.
Unverified claims and gaps
- Anthropic's review numbers are self-reported. The 90 percent figure, the revert-rate drop and the 65→78 / 8.9→1.5 convergence table come from Anthropic's October 15 engineering post and were not independently audited. Treat them as one strong team's internal result, not an industry benchmark.
- Cursor's affected-user count is Cursor's own. "At most 5,000" and "under 0.01 percent of customers" are company figures. Reuters relayed the 5,000 number without independent verification.
- The attribution chain is Cursor's account. That an exposed key issued to Fireworks AI, and unredacted credentials in shared agent traces, were the path in is from Cursor's November 13 incident update, as reported by BleepingComputer and itdaily. Fireworks' own statement was not read for this draft.
- Nadella's quotes are as reported. They come from The Pragmatic Engineer episode published November 16, relayed by The Next Web, Silicon Report and the newsletter recap. I did not listen to the audio, so wording should be checked against the transcript before publishing.
- Bitdefender did not publish scale. How many developers ran the
setup.jspayload and who is behind the 22-repository campaign are both unknown. The 22-repository figure is Bitdefender's. - Vendor claims, unverified: Entra Agent ID coverage and lifecycle defaults, Foundry agent accounts and blueprint controls, and LangSmith Tool Gateway behavior and audit contents all come from vendor documentation and posts. LangChain's gateway has no independent security evaluation.
- Not covered here: the LiteLLM supply-chain report, the Grok Build credential exposure, Databricks Genie ZeroOps and Google's Gemini Tool Retrieval. Each deserves its own piece.
- Practitioner claim, not a measurement: Kevin Beaumont's point that auto-updating to the fixed Claude Code build does not remove an existing backdoor matches Cursor's own guidance ("uninstalling the extension may not be sufficient"), but it is not a vendor-confirmed measurement.
- Lab conditions: Forever Security's finding that Codex followed a planted
AGENTS.mdin more than 90 percent of attempts, and about half for a researcher-written Claude Code variant, comes from controlled tests. Nobody has published how often this succeeds against real repositories.
Sources
- Cursor Team, "Security notice — malicious version of Anthropic.claude-code (2.1.312 and 2.1.313) identified in the Cursor VS Code Extension Marketplace," Cursor, Oct 29, 2026 (updated Oct 30). https://cursor.com/blog/claude-code-extension-security-notice
- Cursor Team, "An update on our recent security incident," Cursor, Nov 13, 2026. https://cursor.com/blog/security-incident-update
- Lawrence Abrams, "Cursor confirms security breach led to malicious Claude Code extension," BleepingComputer, Nov 14, 2026. https://www.bleepingcomputer.com/news/security/cursor-confirms-security-breach-led-to-malicious-claude-code-extension/
- Bill Toulas, "Malicious Claude Code extension on Cursor planted SSH backdoors," BleepingComputer, Oct 30, 2026. https://www.bleepingcomputer.com/news/security/malicious-claude-code-extension-on-cursor-planted-ssh-backdoors/
- "Cursor says up to 5,000 users affected by tampered Claude Code extension," Reuters, Oct 30, 2026. https://www.reuters.com/business/media-telecom/cursor-says-up-5000-users-affected-by-tampered-claude-code-extension-2026-10-30
- Microsoft Threat Intelligence, "Inside a malicious Claude Code-branded extension and its persistent SSH backdoor," Microsoft Security Blog, Oct 30, 2026. https://www.microsoft.com/en-us/security/blog/2026/10/30/inside-malicious-claude-code-branded-cursor-extension-persistent-ssh-backdoor
- Andrei Anton-Aanei and Alina Bîzgă, "How AI Agents Become New Targets in GitHub Malware Campaign," Bitdefender Labs, Nov 17, 2026. https://www.bitdefender.com/en-us/blog/labs/how-ai-agents-become-new-targets-in-github-malware-campaign
- Gal Weizman and Omer Samet, "Markdown Is the New Executable," Forever Security, Oct 22, 2026. https://forever.security/blog/hijacking-ai-agents-via-downloads-folder
- Bill Toulas, "AI coding agents hijacked using AGENTS.md file in Downloads folder," BleepingComputer, Oct 25, 2026. https://www.bleepingcomputer.com/news/security/ai-coding-agents-hijacked-using-agentsmd-file-in-downloads-folder
- Gergely Orosz, "Software engineering after code becomes cheap with Satya Nadella," The Pragmatic Engineer, Nov 16, 2026. https://newsletter.pragmaticengineer.com/p/software-engineering-after-code-becomes
- "Satya Nadella says Claude Code caught Microsoft off guard and the IDE faded," The Next Web, Nov 16, 2026. https://thenextweb.com/news/satya-nadella-claude-code-ide-pragmatic-engineer
- Addy Osmani, Morgan Westlee Lunt and Qing Wang, "How the Claude Code team does code review," Anthropic (claude.dev), Oct 15, 2026. https://claude.dev/blog/solving-code-review-at-anthropic/
- Steef-Jan Wiggers, "Anthropic Outlines its AI-Powered Code Review Process for Claude Code," InfoQ, Nov 15, 2026. https://www.infoq.com/news/2026/11/claude-code-review
- Microsoft, "What's new in Foundry Agent Service at Ignite 2026," Microsoft Foundry Blog, Nov 18, 2026. https://devblogs.microsoft.com/foundry/whats-new-in-foundry-agent-service-at-ignite-2026
- Microsoft, "Microsoft Entra news announcements from Microsoft Ignite November 2026," Microsoft Tech Community, Nov 17, 2026. https://techcommunity.microsoft.com/blog/microsoft-entra-blog/ai-is-changing-access-see-how-entra-helps-you-stay-ahead-/4556456
- Microsoft, "What's new in Microsoft Agent 365: Ignite 2026," Microsoft Tech Community, Nov 17, 2026. https://techcommunity.microsoft.com/blog/agent-365-blog/whats-new-in-microsoft-agent-365-ignite-2026/4571753
- Karthic Subramanian, "LangSmith Tool Gateway: Secure, governed tool use for agents," LangChain, Nov 19, 2026. https://www.langchain.com/blog/langsmith-tool-gateway
- LangChain, "How Tool Gateway works," LangChain docs (accessed Nov 21, 2026). https://docs.langchain.com/langsmith/tool-gateway-how-it-works