Skip to content

S13 - Guest Confinement

Purpose: Controls inside the guest that narrow what a project user’s processes can do, and tell the host which program opened each connection. They add a layer on top of the host-side controls and never replace them.

Requirements: SEC05-default-denySEC05-default-deny: Default-deny egress, enforced on the hostOnly allowlisted hostnames are reachable., SEC06-repo-writesSEC06-repo-writes: Repository-scoped writesGit pushes and repository-mutating API calls are allowed only for the repositories of the projects that have a session in the VM., SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another., SEC11-root-gains-nothingSEC11-root-gains-nothing: Guest root is not a privilegeFull control of the guest grants no control over enforcement, secrets, or policy., FR15-inspectFR15-inspect: Inspect what happenedThe user can inspect what happened: per-session audit log, policy explanation, diff of returned work with risky changes flagged., NFR06-explained-refusalsNFR06-explained-refusals: OperabilityEvery refusal names the rule that caused it and how to change it..

Tests: C03-policy-and-approvalsC03-policy-and-approvals: Policy and ApprovalsThe test cases for network policy: loading it, combining the policies of the projects in one VM, modes per host, profile parts, learn mode, and the approval flow., C09-guest-and-sessionsC09-guest-and-sessions: Guest and SessionsThe test cases for what a project user can reach inside the guest, wb-guestd's update and the guest clock, the shared toolchain prefix, the guest admin password, and the session lifecycle.

Briefs: B20-guest-xcodeB20-guest-xcode: Can Xcode builds, tests and simulators run for a project user without a GUI login?Yes, with conditions., B29-vsock-handoffB29-vsock-handoff: Can wb-vmd hand guest connections to our Go daemons as descriptors, also across a restore?Yes, with conditions.

This spec describes macOS guests, the v1 target. OpenShell’s Linux sandbox runtime is the model for this layer: Landlock, seccomp, and process identity from /proc. Linux and Windows guests get their own mechanisms 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. when they arrive.

Page What it covers
S13-01-process-hardeningS13-01-process-hardening: Layer 1: Process Hardening (v1)How wb-guestd hardens every process it starts for a project user, and how it stops and kills a project user's processes. Layer 1: project users, limits, and stopping and killing a project user’s processes
S13-02-filesystem-profileS13-02-filesystem-profile: Layer 2: Seatbelt Filesystem Profile (v1)The Seatbelt profile each session's process tree runs under, where it comes from, its exceptions for Xcode builds, and its known gaps. Layer 2: the Seatbelt profile, the host-guest socket, the Xcode build profile, and the known gaps
S13-03-network-attributionS13-03-network-attribution: Layer 3: Per-Program Network Attribution (after X14-flow-attribution)How a Network Extension in the guest labels each flow with the program and user that opened it, and how rules match on the label. Layer 3: the per-program label on each flow, after X14-flow-attributionX14-flow-attribution: Guest flow attributionA Network Extension transparent proxy in a macOS guest (S13-guest-confinement): can it be approved during the image build without MDM?
S13-04-endpoint-securityS13-04-endpoint-security: Layer 4: Endpoint Security (optional, after X15-endpoint-security)What an Endpoint Security client in the guest would add, and why Wraith Box may ship without it. Layer 4: Endpoint Security, optional, after X15-endpoint-securityX15-endpoint-security: Endpoint Security entitlementRequest the Endpoint Security entitlement from Apple.

The guest kernel, or software that guest root can reach, enforces each control here. T00-indexT00-indexboundary 6 is the host terminal stream. assumes the attacker may hold guest root (SEC11-root-gains-nothingSEC11-root-gains-nothing: Guest root is not a privilegeFull control of the guest grants no control over enforcement, secrets, or policy.). So:

Guest root can forge identities. Per-program and per-project rules then come down to the union of the VM’s grants. That is residual risk T06-forged-labelsT06-forged-labels: Forged program labels after guest rootAfter a guest root escalation, forged program identities in the guest confinement layer (S13-guest-confinement)..

The host floor is per VM, not per project (S07-01-per-vm-policyS07-01-per-vm-policy: Enforced per VMWhy the VM is the unit the gateway enforces, how the policies of its projects combine, and what happens when they conflict or change.). Any process in a VM can use the network grants and credential bindings of every project with a session in it, without guest root (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.).

Only a label from this layer can tell projects apart on the network (S13-03-network-attributionS13-03-network-attribution: Layer 3: Per-Program Network Attribution (after X14-flow-attribution)How a Network Extension in the guest labels each flow with the program and user that opened it, and how rules match on the label.). It does so only against a process without guest root.

Status: Draft