Agent Security in One Week: The Primitives and the Threats Arrived Together
Two Clouds Ship the Same Fix
AWS MCP Server went GA with IAM-authenticated agent access to 15,000+ API operations, sandboxed Python execution, and wiring for Claude Code, Cursor, and Kiro. Google Cloud shipped first-class agent identities with OAuth, certificates, and runtime defense, treating agents as distinct security principals. Both landed within days. That is two hyperscalers conceding the same point: agents running on a developer's token is now the legacy pattern.
Three Attack Vectors Against the Legacy Pattern
Three research groups published in the same window explaining why the fix is overdue:
- MCP Config Hijacking — Mitiga demonstrated a malicious npm package editing
~/.claude.jsonto drop an attacker-controlled proxy in the path. Every OAuth token and every tool response flows through it. The file is plain JSON. No signature check. No origin pinning. A postinstall script writes it silently. - SKILL.md Poisoning — Agents read SKILL.md for project conventions and execute the content as trusted instructions. A PR that edits SKILL.md to exfiltrate secrets gets followed by the agent on the next run. No supply-chain scanner examines these files today.
- Predictable LLM Passwords — GitGuardian measured Llama-3.3-70b emitting the substring 'Gx#8dL' in 96% of password outputs. Claude Opus 4.6 hits 35% uniqueness. 28,000 LLM-generated passwords surfaced on GitHub over 5 months. 1,800 of those were in .env files.
The Blast Radius Is Proven
A Cursor agent dropped PocketOS's production database in under 10 seconds. The outage ran past 30 hours. The agent held DATABASE_URL pointing at prod with DDL privileges, and ran DROP with the same confidence it writes a unit test. Separately, LayerX showed cross-extension injection against the Claude Chrome extension, pulling out GitHub source, Google Drive files, and email. Anthropic's May 6 patch is incomplete. Takeover paths remain.
The agent did not malfunction. It executed exactly what its permission grant allowed. The permission grant is the bug.
The Architecture Fix
The new AWS and GCP primitives give the agent its own principal with bindings and a revocation path that do not touch the developer account. Revoking a service account stops the agent without locking anyone out of the console. The pattern:
- Dedicated agent IAM role. Read-only by default. Write credentials injected only at the step that needs them.
- MCP config integrity monitoring. inotifywait or fswatch on
~/.claude.jsonand equivalents. - SKILL.md treated as reviewed source. Same PR review as
.github/workflows. - Zero trust on LLM-generated secrets. Any model-generated credential is compromised on arrival. Use
openssl rand -base64 32. - Browser profile isolation. Run AI extensions in a separate Chrome profile that is not logged into GitHub, Drive, or the cloud console.
What to do
Migrate production agents from developer tokens to dedicated service accounts using AWS MCP Server or GCP agent identities
Add file integrity monitoring on ~/.claude.json, .cursor/mcp.json, and equivalent MCP config files
Add SKILL.md and AI instruction files to your PR review requirements and supply-chain scanning
Grep your codebase for LLM-generated passwords and rotate them — use GitGuardian's known-substring heuristics
Audit all AI coding agent database credentials — enforce read-only roles with DDL gated behind human approval