Why, and how you need to sandbox AI-Generated Code?
summary
Argues that AI-generated code is untrusted and must run in capability-based sandboxes, not evals; demonstrates two concrete builds: a fast skill runner using V8 isolates (quarter-millisecond startup, no filesystem, network null by default) and a full dev-workbench using container VMs (clones, npm install, long‑running servers, seconds to start); prescribes per-user sandboxes, proxying secrets, strict time/memory caps, forced cleanup, and logging; shows a production demo at promptmotion.app that generates preview URLs.
AI-written summary · about
chapters (23)
- 0:00AI code risks introduction
- 1:42AI code is untrusted internet code
- 3:04Three threats from LLM code
- 6:59Sandboxing untrusted code history
- 8:25Capability-based security explained
- 10:10Sandboxing approaches spectrum
- 11:35Threat model for AI code
- 13:21Two sandboxing examples
- 15:51How isolates provide isolation
- 17:56Capability-based security in practice
- 19:42Trade-offs of isolates
- 21:28When to use containers
- 23:34User isolation in containers
- 24:58Container sandbox architecture
- 26:25One user one sandbox pattern
- 27:29Never pass secrets to sandbox
- 28:53Sandbox cleanup and limits
- 29:57Trade-offs of containers
- 31:03Isolates vs containers decision
- 33:11Sandboxing AI code checklist
- 35:43Treat AI code like anonymous code
- 36:25Key takeaways recap
- 37:30Resources and further reading
related talks
25mPlease Sandbox your AI Agents
24mContained Intelligence: Secure Sandboxing for Gen AI Code
22mNo better sandbox: Wasm and the future of AI agent runtimes
01h 48mHow to add secure code interpreting in your AI app
32mLLMs Behind Bars: Sandboxes at Scale for AI on a Short Leash
14mTaming Agentic AI: Run Rogue Code Safely on Kubernetes with Agent Sandbox
34mZero Secrets: Building Secure Infrastructure for AI Agents
30mWhat Are the Security Risks Associated with AI-Generated Code? 🤔
