SEC00 - Security requirements
Purpose: The security controls Wraith Box enforces. None of them is
ever weakened to make something work (AGENTS.md), and each holds
against the adversary of T00-indexT00-indexboundary 6 is the host terminal stream..
Requirements
Section titled “Requirements”- SEC01-separate-kernel: Separate kernel. The agent runs in a hardware-virtualized guest with its own kernel, never sharing a kernel with the host or with another environment of the user (for example a WSL distribution). There is no “lighter” same-kernel mode.
- SEC03-no-host-exec: No host code execution via returned work. Nothing the agent produces executes on the host without an explicit user action; returned changes to files the host may later execute are flagged.
- SEC04-no-guest-secrets: No secrets in the guest. This includes the model credential. The
guest only ever holds placeholders; real credentials are injected on the
host side of the network boundary and replace anything the guest sends.
A credential that opens nothing outside its own VM, such as the
guest’s own
wbadminpassword, isn’t a host secret. It enters its VM only at first contact, before project code runs, and is rotated per VM (S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them.). - SEC05-default-deny: Default-deny egress, enforced on the host. Only allowlisted hostnames are reachable. No raw-IP destinations, no host or LAN access, no arbitrary DNS (no DNS tunneling), no UDP except DNS to the gateway.
- SEC06-repo-writes: Repository-scoped writes. Git pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM. The host can’t tell the projects in one VM apart, so it enforces this per VM, and the projects that share a VM share their write grants (T11-shared-vm-grantsT11-shared-vm-grants: Projects in one VM share network grantsThe host sees one guest address per VM, and can't tell which project user, session or program opened a connection.). Gists, repository creation, forks and package publishing are denied, and no policy allows them. Work returned over the host-guest socket lands only in the session’s own branch of its project’s landing repository (S08-workspace-and-gitS08-workspace-and-git: Workspace and Git Round TripHow code gets into the guest and how the agent's work gets back out, without sharing the host filesystem.).
- SEC07-dep-gate: Dependency gate. Package downloads (npm, PyPI, Go modules, crates) are refused when the version is younger than a minimum age or has a known vulnerability at or above a severity threshold.
- SEC08-proj-isolation: Per-project isolation. Each project has its own guest user,
state and history, and one project cannot persist into another. Per
project: the guest user with its home and clone, enforced by the
guest kernel (T05-cross-proj-clonesT05-cross-proj-clones: Other projects' clones after guest rootAfter a guest root escalation inside the shared work VM, read or write access to other projects' guest clones (code only; no secrets are present; changes still return only as reviewable branches).), and the host-side settings,
policy file and landing repository. Per VM: network grants,
credential bindings and approvals of the projects with a session in
the VM, which any process in the VM can use (T11-shared-vm-grantsT11-shared-vm-grants: Projects in one VM share network grantsThe host sees one guest address per VM, and can't tell which project user, session or program opened a connection.).
A repository the user doesn’t trust runs in the isolated VM, by
--isolatedorplacement = isolated. New projects start in the work VM (T13-new-project-grantsT13-new-project-grants: New projects share the work VM's grantsA newly registered project has placement = work (S06-04-vms-and-placement).). A project whose grants must stay apart is set toplacement = isolated, andwb-hostdrefuses to start another project next to it (S06-04-vms-and-placementS06-04-vms-and-placement: VMs and PlacementThe work VM and the isolated VM, Xcode in them, and which VM a project's sessions run in.). - SEC09-host-policy: Policy is held on the host. The guest cannot read or change policy.
Repository-supplied configuration is ignored unless the user turns on
the project’s
config_trust(wb trust), and can never add credentials.config_trustdoesn’t decide the VM. - SEC10-audit: Audit. Every egress decision, approval, and returned change is recorded on the host in a persisted log the guest cannot alter.
- SEC11-root-gains-nothing: Guest root is not a privilege. Full control of the guest grants no control over enforcement, secrets, or policy.
- SEC12-least-privilege: Least privilege on the host. No root or administrator rights
at run time and no extra host user accounts. The platform’s hardening
applies (hardened runtime and minimal entitlements on macOS, the
equivalents in S12-platformsS12-platforms: PlatformsWhich host and guest operating systems Wraith Box targets, how platform-specific code is isolated, what each platform uses, and how wb works inside WSL. elsewhere). Credentials are nominally
held by the configured secret store. Each host process has a declared
set of items, each with the access it may have: write, fetch, or use
in place. It gets them just in time, for no longer than it needs
them. A credential never appears in arguments, the environment, a
file, a log line, a gRPC message field, an audit record, or an error
message (S15-least-privilegeS15-least-privilege: Least Privilege on the HostThe security design for SEC12-least-privilege: which rights Wraith Box takes on the host, where credentials are held, and how each host process gets only the credentials it needs, for only as long as it needs them.).
One-time OS prerequisites (enabling a virtualization feature, access to
the hypervisor device) are documented and checked by
wb setup, never performed silently. - SEC13-bounded-resources: Bounded resources. CPU, memory and disk of each VM are capped. So is the host work a VM can cause: every host handler that takes input from a guest limits, per VM, the rate and the size of that input and the work it runs at once, and refuses what is over a limit (S04-08-records-and-boundsS04-08-records-and-bounds: Records, Versions and BoundsThe records daemons send wb-hostd, the build version rules between processes, the bounds on host work a guest can cause, and logs., “Host work the guest can cause”).
- SEC14-no-fake-approvals: Approvals cannot be spoofed by the guest. Approval prompts are never rendered in the agent’s terminal stream.
- SEC15-no-guest-disk-mount: The host never mounts a guest-written disk. A disk
image is guest-written once a guest has run with it attached, and
every copy or clone of a guest-written image is guest-written too. No
host process attaches, mounts, probes or parses any bytes of a
guest-written image, the partition map and image container included.
The only reads are byte copies. The guest may have written any bytes
there, and a host kernel or tool that parsed them would take the
guest’s input. Copying, cloning and deleting the file, and attaching
it to a VM, are allowed. A data disk is attached only to the VM slot
whose
state.dbrecord names it, from that VM’s bundle, and never to a maintenance VM or the other slot. A copy or clone of a data disk is never attached to any VM. The one exception is a blank image the host itself created: the host may format it before any guest has run with it, and the exception ends when a guest first runs with it (S06-05-disksS06-05-disks: DisksA VM's system disk and data disk: how the data disk keeps what the guest flushes, and how the guest mounts it.). Recovering data from a guest-written image needs a booted guest.