« All posts

Jailbox: Hardened, Network-Isolated KVM VMs for AI Coding Agents

Jailbox creates hardened, network-isolated KVM VMs to contain AI coding agents and untrusted code, with no route back to your host or LAN.

Supply chain attacks and increasingly capable AI coding agents mean developers are routinely running unreviewed code with their own privileges. Jailbox (kvm-jailbox) addresses this with a single command that spins up a plain, hardened KVM virtual machine: one that can reach the internet but has no route to the host, the LAN, or any private address. The whole development environment — editor, agents, containers — lives inside that boundary. To validate the isolation, the author gave an AI agent root access inside the VM and asked it to break out; it failed.

The motivation spans three converging risks: a wave of supply chain compromises across npm and PyPI (LiteLLM, Axios, chalk, and others), AI coding agents like Claude Code and Codex operating with full user privileges and exposure to prompt injection, and development tools themselves becoming attack surface, as seen in the GlassWorm VS Code extension worm and the Nx Console credential leak. Compared to alternatives like bubblewrap, gVisor, Firecracker, and Docker Sandboxes, the design opts for plain KVM — a hypervisor already battle-tested across public cloud infrastructure — over lighter, kernel-sharing sandboxes or opaque microVM products.

For engineers, the key insight is that containers alone share the host kernel and typically don't wrap the editor or agent processes that sit outside them with full credentials. Jailbox's defense-in-depth model puts the entire toolchain behind a hard virtualization boundary and enforces a network policy that allows outbound internet access while blocking any path back to private infrastructure.