Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

Best practiceRunning agents

Run agents in a sandbox with default-deny egress

OWASP ASI05OWASP ASI10

Agents run code, install packages and follow links. In the Hugging Face intrusion an evaluation agent broke out through a proxy bug and cloud metadata; in ShadowRay exposed clusters mined crypto. Containment limits what a bug or a hijack can reach.

What to do

  1. Run agent code in a container or microVM with a read-only root, no host mounts beyond the workspace and no privileged mode.
  2. Deny outbound network by default; allow the model API, package registries and named hosts only.
  3. Block the cloud metadata endpoint (169.254.169.254) and do not mount cloud credentials into agent pods.
  4. Give each run a fresh sandbox and destroy it afterwards so persistence has nowhere to live.

Sources

Check your own AI plan against the practices: Plan check