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