Skip to content
Wardcase Docs

Isolation model

Treat code an agent runs as untrusted. A model wrote it, and whatever the model read along the way, a web page, a file, an issue comment, can steer what it writes next. So the question is not whether the code will misbehave but how far it can get when it does. Each layer below answers that for one direction.

A gVisor container, not a plain one. Each sandbox is a Docker container that runs under gVisor (runsc). gVisor is a kernel written in user space: it handles the sandbox’s system calls itself, so code in the sandbox does not talk to the host’s Linux kernel directly. A plain container shares that kernel, and one kernel bug can then be enough to reach the host. gVisor puts a second, much smaller surface in the way.

No privileges to start with. Inside the container:

  • Processes run as the unprivileged user agent (uid 1000), in /work.
  • Every Linux capability is dropped, and no-new-privileges stops a process from gaining one, so a setuid binary gives nothing.
  • The root filesystem is read-only. System files cannot be changed, and system packages cannot be installed.
  • /work is the only persistent writable place: a disk image of the size’s disk limit, mounted for this sandbox alone. /tmp and /run are small in-memory filesystems.

Hard limits on resources. The size sets the vCPUs, the memory (with no swap on top) and the disk, and the number of processes is capped. A fork bomb or a memory leak stops at the sandbox’s own limits instead of slowing the host’s other sandboxes.

SizevCPUMemoryDiskPer hour
small11 GiB5 GiB$0.13
medium24 GiB10 GiB$0.32
large48 GiB20 GiB$0.64

No SSH server inside. SSH ends at a gateway in the host daemon, which checks your key or token with the control plane and then attaches a shell to the container. There is no daemon listening inside the sandbox for anything to attack.

Its own network. Each sandbox gets its own network namespace on its own bridge. It cannot see other sandboxes’ traffic.

A policy it cannot change. Outbound connections pass the sandbox’s egress policy, which the host enforces in its own kernel with nftables, outside the container. Nothing the code does inside, as any user, can edit those rules. The built-in deny-list blocks private networks, the cloud metadata endpoint, the host itself and known mining pools for every sandbox. See How egress policy works.

No way in except through the platform. A sandbox cannot open connections to its host; it can only answer connections the host opens, which is how the port proxy reaches an exposed port. Connections from one sandbox to another are refused. Inbound traffic reaches a sandbox only through a port you exposed, or through SSH.

Hosts hold no customer credentials. Hosts never see your API keys, and they hold no object storage keys: when a host moves a file or a snapshot to or from object storage, it uses a short-lived signed URL that the control plane made for that one object.

Environment variables stay out of the record. Values you pass with env go to the host for the sandbox’s commands and SSH sessions. The control plane does not store them and they never appear in the audit trail. The host keeps them in a state file only its daemon can read, so it can restore the sandbox after a daemon restart.

Keys are scoped. An API key can do only what its scopes allow, is stored as a SHA-256 hash, and stops working on its next request after you revoke it. See Authentication.

The isolation settings above were checked on a real Linux host with Docker and gVisor: commands ran as uid=1000(agent), a write outside /work and /tmp failed with Read-only file system, a system package install failed, the cloud metadata address was unreachable and the block was recorded, and after every sandbox ended no container, network, mount or firewall rule was left behind.

Isolation limits what code can reach. It does not decide what the code is allowed to do with what you gave it.

  • Everything inside the sandbox is the agent’s. Files you upload, environment variables you pass and anything the agent downloads are readable by every process in the sandbox. Give a sandbox only what its task needs.
  • Allowed destinations are allowed. If the policy lets the sandbox reach a host, code in the sandbox can send data there. An allow-list with only the destinations the task needs is the control for that.
  • Hosts are shared. Sandboxes of different organizations can run on the same host, each in its own gVisor container, network and disk.
  • SSH keys are per organization. Any public key registered on the organization can open any of its sandboxes.