Security
Threat model, isolation guarantees, and disclosure policy for infrastructure that runs code you didn't write on behalf of agents that aren't watching it.
Threat model: every guest is malicious root#
Sandal's starting assumption is not "our customers are trustworthy", it's that every guest is malicious root. An agent given a sandbox may run arbitrary, untrusted, possibly adversarially-generated code at any time, and we design as if it had full root inside its own VM (the default template runs your code as uid 2000 without sudo, but the boundary does not rely on that). Nothing about the design depends on a guest behaving. The isolation boundary has to hold even against a guest that is actively trying to break it, because that's the actual workload: agents running code nobody reviewed, at machine speed, unattended.
Everything below follows from that one assumption.
One VMM process, one uid, per tenant#
Each guest's hypervisor process (Firecracker or Cloud Hypervisor) runs as its own dedicated OS user on the host, with no privileges beyond what that single VM needs. There's no shared VMM daemon multiplexing multiple tenants' guests through one process and one set of file descriptors, a compromise of one guest's VMM process doesn't hand an attacker a foothold into any other tenant's process, because there's nothing else reachable from that uid.
This is the same reasoning that pushed the industry away from shared-kernel containers for hostile-multitenant workloads: process isolation plus a shared kernel is one bug away from cross-tenant compromise. A dedicated kernel per guest, run as a dedicated uid, removes the shared attack surface entirely rather than trying to patch it closed.
Dedicated network fencing#
Every guest gets its own TAP device and its own network namespace. There is no shared bridge that a guest could ARP-spoof or sniff its way across to reach a neighbor. A sandbox can't reach the host's management plane or other tenants' guests.
Internet egress is a per-sandbox policy. Pass networkPolicy: { allowInternet: false } at create to cut it off entirely (DNS and outbound connections fail inside the sandbox; verified on the beta deployment), or supply egress/ingress rules. If you run untrusted code that has no business on the internet, turn egress off: it is not off by default. See Sandboxes.
No public management listeners, outbound relays only#
Host agents, VMM control sockets, and the internal control plane never listen on a publicly reachable address. There is no management port to scan, no admin API exposed to guest-reachable networks, no "internal" service that's actually just firewalled by convention. Guests that need to talk to the control plane do so through outbound relays: the guest (or the host agent on its behalf) initiates the connection outward to a relay, which is the only thing that ever accepts an inbound connection. An attacker who fully compromises a guest and can send arbitrary packets still can't reach a listening management interface, because there isn't one to reach.
What deletion does to your data#
Persistent volumes are encrypted with their own key, and erasing one destroys that key on the host (with signed erase evidence recorded on the volume). A sandbox delete keeps its persistent volumes unless you ask for them to be erased (deleteAttachedVolumes, or sandal volumes delete). On the default template, a sandbox's /workspace is a volume with its own encryption key, and deleting the sandbox crypto-erases it: the key is destroyed within about 20 seconds. The rest of a sandbox's own disk is wiped on delete (its blocks are zeroed before reuse). Destroying a secret deletes its stored value immediately; backups containing it expire within our backup retention window.
Forks don't inherit grants, but they do inherit disk#
sandal.sandboxes.fork(parentId, { idempotencyKey, expectedRevision }) creates a new sandbox from the parent's disk. It does not copy the parent's memory, processes, port exposures or other platform grants; the child has its own id and gets its own access issued explicitly. Forking is a common agent pattern (branch an exploration, try N approaches in parallel), and a platform grant that silently propagated through every fork would turn one grant into an unbounded number of live copies.
What the fork does copy is every byte on disk. If the parent's disk contains a credential (an API key in a config file, an SSH key, a token in shell history), every fork has it too. Keep secrets out of the disk you intend to fork, or rotate them per child.
API keys and access#
The public API authenticates with project API keys sent as Authorization: Bearer <key>:
- Project-bound. A key belongs to one project; the server derives and checks organization, project, expiry and revocation on every request.
- Scoped. Sandbox work needs
sandbox:readandsandbox:write; requests outside a key's scopes fail with403 permission_denied. - Expiring and rotatable.
sandal.keys.self()shows a key's expiry; where an administrator enables it,sandal.keys.rotateSelf({ idempotencyKey })mints a successor with the same scopes and a bounded overlap before the old key is revoked. - Never in URLs. Keys go in the
Authorizationheader only. The CLI stores them in~/.config/sandal/config.jsonwith0600permissions;SANDAL_API_KEYoverrides it.
Port exposure URLs (sandboxes.exposePort) are private by default: every request needs the project API key or a short-lived access token, so an exposed port is not a public link. Treat anything you give an exposure URL plus a key to as having project access. To show a preview to someone without a key, create a share link (sandal share <sandbox> <port> [--ttl 1h] [--single-use]): it is time-bounded (24 h at most), optionally single-use, and revocable (sandal share revoke; a revoked link answers 410). A revoke does not end a session that is already open (up to 1 h).
Don't hand your project API key to code running inside a sandbox. If an agent inside a sandbox needs to call Sandal, give it the narrowest key you can and rotate it.
Secrets#
Secrets are delivered as environment variables by default, which means the value is inside the sandbox. Brokered secrets (preview) keep HTTP(S) credentials outside: Sandal injects them only into HTTPS requests to the hosts you allow, other hosts see a placeholder, and revoking stops injection within about 10 s. The real value is injected only once the sandbox's secretBrokering state is active, about 6-25 seconds after the sandbox becomes running; until then requests carry the placeholder. Make the first request to a credential host only after active (see Secrets). SSH keys, database passwords and other non-HTTP credentials use environment delivery. See Secrets.
What is logged#
The project audit-events API records API actions (create, expose port, API-path exec). Commands run over the direct exec path that the SDKs use are not in a tenant-readable audit log, and there is no per-sandbox network log or per-request secret audit today.
Compliance status#
Sandal has no compliance certification (such as SOC 2) yet. Treat the guarantees on this page as the accurate current state, not a certification. All workloads run in the EU (hosts in Germany, Finland and Luxembourg); there is no region choice.
Responsible disclosure#
If you find a way to break isolation between tenants, escalate privilege on a host, bypass network fencing, forge or replay a signed command, or otherwise get more access than a scoped grant should allow, we want to hear about it before anyone else does.
- Report to security@sandal.dev.
- Include what you found, the smallest reproduction you have, and the impact as you understand it.
- We'll acknowledge receipt, keep you updated as we investigate and fix, and credit you (if you want credit) once a fix is out.
- Please don't test isolation boundaries against other customers' live workloads, use your own sandboxes, devices, and runners for any exploit development.
We don't have a bug bounty program running yet; if that changes, this page will say so.