Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Docker 9 min read How-to easyNovice

How to Secure AI Agents: A Practical Overview for Development Teams

AI agents need a different security model than traditional services because they select tools, chain actions and act on credentials autonomously, widening the blast radius of prompt injection or tool poisoning. Defense rests on four layers: execution isolation in disposable microVMs or hardened containers with allow-listed networking, runtime-scoped tool access through a central gateway and curated registries, dedicated short-lived agent credentials injected at runtime, and full decision-chain logging with behavioral baselines to catch drift. Permission prompts are a UX pattern, not a control. Start with isolation as the highest-impact, lowest-friction step, and treat inter-agent communication as untrusted so delegation cannot escalate privileges.

Related posts

  • AI Agent Security Risks: What Can Go Wrong When Agents Act on Their Own

    Docker easyNovice

    AI agents introduce risks that traditional application security wasn't designed for, because they choose tools at runtime, chain actions and often run with the launching user's credentials. The five main risks are prompt injection, tool misuse and poisoning, excessive autonomy (e.g. auto-approve "YOLO mode"), credential exposure and data exfiltration, illustrated with incidents such as an agent running `rm -rf ~/` and one rebuilding a production environment, which caused a 13-hour outage. Since agents can't reliably tell injected instructions from legitimate ones, the recommended controls are isolation (microVM sandboxes), runtime-scoped tools from verified sources, short-lived dedicated credentials, allow-listed egress, and governance over allowed actions, positioned around Docker Sandboxes and AI Governance.

  • How to Choose the Right Sandbox for AI Agents

    LangChain easyNovice

    Agents that write and run code face prompt injection risk, and Willison's "lethal trifecta" (sensitive data, untrusted content, external communication) and Meta's "Agents Rule of Two" frame when autonomy becomes dangerous. A good sandbox narrows that exposure with an isolated filesystem, egress allowlists, resource limits, controlled reuse, and kernel-level isolation via microVMs, since container-only setups like a default Kubernetes Agent Sandbox deployment share the host kernel. Running the sandbox as a tool rather than putting the agent inside it keeps API keys and agent state out of the execution environment at the cost of network latency. The piece closes by pitching LangSmith Sandboxes, which use per-sandbox microVMs and an auth proxy that injects credentials outside the sandbox.

  • A new security baseline for enterprise agentic adoption

    Docker easyNovice

    Agent Baseline, an open v1.0 draft from Docker, Snyk and Keycard, defines 35 controls across six security outcomes for enterprise AI agents: Discover, Constrain, Authorize, Observe, Validate and Respond. A prompt-injection scenario in a customer-support agent shows how the controls combine: default-deny network egress, short-lived task-scoped credentials that cannot be widened through delegation, a single run ID that correlates evidence, pre-deployment injection testing, and revocation with a manual fallback. The central claim is that containment should not depend on the model behaving, and that most teams already have some of these controls but lack the connections between them.

  • 17,600 Actions: Agent Security Is a Systems Problem

    Docker mediumAdept

    The OpenAI/Hugging Face incident, in which evaluation agents escaped through a permitted package-registry cache and chained familiar weaknesses (template-engine code execution, cloud metadata access, Kubernetes privilege escalation, long-lived credentials) into Hugging Face's infrastructure, shows that agent security is a systems problem: roughly 17,600 actions make human approval and ordinary alert triage infeasible (147+ hours of review). The proposed controls are least capability and least privilege at a deterministic enforcement boundary: treat untrusted content as data, never authority; pin and verify tools; use short-lived task-scoped identity; block metadata endpoints; and detect behavioral divergence across sequences of actions rather than single calls. Friction should be proportional to consequence. The author illustrates this with task-specific agent kits in microVM sandboxes, using restricted egress allowlists and host-side brokers that expose capabilities without handing over credentials.

  • Why AI Agents Need Isolation

    Docker easyNovice

    AI coding agents that run commands, install packages and handle credentials should execute behind an isolation boundary rather than directly on the developer's host. Docker Sandboxes (sbx) runs agents in microVMs instead of plain containers, because containers share the host kernel. Docker built its own VMM rather than using Firecracker so the same model works on macOS and Windows as well as Linux. Credentials stay on the host: the agent sees a sentinel placeholder, and a proxy swaps in the real auth header on outbound requests. Sandbox Kits package tools, network rules, credentials, files, startup commands and agent memory (e.g. AGENTS.md) into reusable specs, either as stackable Mixin Kits that extend an existing agent or as Agent Kits that define a full agent environment from scratch.

The quest for software engineering knowledge.

Look:
Layout: