Sandlock: Rootless and Containerless Confinement for AI Agents
summary
Sandlock is an AI-agent sandbox for Linux that confines a process without root, containers, or cgroups and claims ~5 ms startup to lock a process. It composes kernel features Landlock, seccomp-bpf, seccomp user notification, enforces memory limits, IP/port allowlists and HTTP ACLs with optional HTTPS inspection, and implements copy‑on‑write workspace and a dry‑run diff for file changes. Live demos show pinning egress to one API, no‑network executors, pip install dry‑run, and 44× faster startup than Docker.
AI-written summary · about
chapters (16)
- 0:00Introduction to Sandlock
- 1:05Problems with isolation solutions
- 7:28Design principles of Sandlock
- 11:16Kernel features used by Sandlock
- 18:25Protecting secrets and data
- 22:24Demo: API key injection
- 24:51Copy-on-write file system
- 26:41Demo: pip install dry run
- 27:44Resource limitation
- 28:24Prompt injection defenses
- 30:31Demo: prompt injection prevention
- 32:18Performance comparison
- 34:05Comparison with other solutions
- 36:35Trade-offs and future work
- 37:41How to use Sandlock
- 39:08Conclusion and Q&A
