{"slug": "ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before", "title": "AI Agent Security Isn’t a Model Problem: 9 Infrastructure Gaps to Fix Before Production", "summary": "A developer published a nine-point infrastructure checklist for securing AI agents in production, arguing that agent security is a runtime problem rather than a model problem. The guidance covers per-agent non-human identities, least-privilege short-lived tokens, secrets injection at the tool-execution layer, prompt-injection defenses, an allowlist of reviewed MCP servers, permission propagation across delegation chains, human approval gates for high-impact actions, circuit breakers and budget caps, and structured tool-invocation logging. The author's conclusion: \"Stop trying to prompt-engineer your way out of infrastructure vulnerabilities. Secure the runtime, not just the weights.", "body_md": "When multiple agents share a single service login, incident response breaks down—you can’t tell which agent took an action.\n\n• Fix: Provision a distinct, non-human identity for every agent. Never share credentials.\n\nTo get demos working quickly, agents are often handed broad, long-lived API keys. One hallucination or loop can wipe production data.\n\n• Fix: Enforce least-privilege, task-scoped permissions with short-lived, auto-expiring tokens.\n\nPasting API keys or passwords directly into system prompts guarantees they will end up in LLM traces, chat histories, and observability logs.\n\n• Fix: Store credentials in a secrets manager and inject them strictly at the tool-execution layer—never into the context window.\n\nMalicious instructions hidden inside an external email, PDF, or webpage can hijack an agent's control flow.\n\n• Fix: Treat all external data as untrusted. Sanitize inputs, separate data from instructions, and strictly restrict accessible tools.\n\nConnecting agents to random, unverified Model Context Protocol (MCP) servers introduces unreviewed code and potential data exfiltration paths.\n\n• Fix: Maintain an internal allowlist of security-reviewed MCP servers and pin their versions.\n\nWhen Agent A delegates a task to Agent B, permissions often stack up—allowing a low-privilege agent to trigger high-privilege actions through a proxy.\n\n• Fix: Propagate the original user's identity and permission scope down the chain, and limit delegation depth.\n\nGiving agents autonomous write-access to sensitive systems leads to costly mistakes—like issuing an unapproved $2,000 refund or emailing external clients.\n\n• Fix: Require explicit human approval gates for high-impact actions (payments, deletions, external communications).\n\nAn agent caught in a recursive retry loop can burn through 10,000 API calls and thousands of dollars before anyone notices.\n\n• Fix: Implement circuit breakers, hard rate/budget caps per session, and an immediate revocation mechanism.\n\nWithout structured execution logs, debugging failures or passing compliance audits becomes impossible.\n\n• Fix: Log every tool invocation with its inputs, outputs, agent identity, user context, and approval trail.\n\nThe Blueprint in Short\n\n• Identity & Access: Gaps 1, 2, 6\n\n• Inputs & Supply Chain: Gaps 3, 4, 5\n\n• Runtime Guardrails: Gaps 7, 8\n\n• Observability: Gap 9\n\nStop trying to prompt-engineer your way out of infrastructure vulnerabilities. Secure the runtime, not just the weights.", "url": "https://wpnews.pro/news/ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before", "canonical_source": "https://dev.to/ai-ops/ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before-production-1ldh", "published_at": "2026-11-30 14:06:51+00:00", "updated_at": "2026-11-30 14:14:55.885725+00:00", "lang": "en", "topics": ["ai-agents", "ai-safety", "agent-protocols", "artificial-intelligence"], "entities": ["Model Context Protocol"], "also_reported_by": [], "takeaway": "Secure agents at the runtime layer with per-agent identities, short-lived task-scoped tokens, secrets injected only at tool execution, allowlisted and version-pinned MCP servers, human approval gates for high-impact actions, and per-session budget caps and circuit breakers.", "recommendation": {"advice": "Give every agent its own non-human identity with short-lived, task-scoped tokens, keep credentials out of the context window, and require human approval plus hard budget caps before any high-impact action.", "playbook": "agent-security", "playbook_url": "https://wpnews.pro/playbooks/agent-security"}, "alternates": {"html": "https://wpnews.pro/news/ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before", "markdown": "https://wpnews.pro/news/ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before.md", "text": "https://wpnews.pro/news/ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before.txt", "jsonld": "https://wpnews.pro/news/ai-agent-security-isnt-a-model-problem-9-infrastructure-gaps-to-fix-before.jsonld"}}