S07 - Egress Gateway
Purpose: The only path from a guest to any network: a userspace
network stack (wb-netd) and a policy-enforcing proxy (wb-proxyd) on
the host.
Requirements: FR08-no-proxy-configFR08-no-proxy-config: No per-tool proxy settingsAllowlisted network destinations work for every tool without per-tool proxy configuration. to FR10-learn-modeFR10-learn-mode: Learn modeA learn mode, available only to projects whose placement is work (S05-cli), records the destinations a project needs and proposes an allowlist., SEC04-no-guest-secretsSEC04-no-guest-secrets: No secrets in the guestThis includes the model credential. to SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another., SEC10-auditSEC10-audit: AuditEvery egress decision, approval, and returned change is recorded on the host in a persisted log the guest cannot alter., 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., SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped., NFR06-explained-refusalsNFR06-explained-refusals: OperabilityEvery refusal names the rule that caused it and how to change it.. Residual risk 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..
Tests: C01-network-and-dnsC01-network-and-dns: Network and DNSThe test cases for the guest's network path: the link endpoint, addressing, and the DNS gateway with its hold, quiet refusals, and negative answers., C02-streams-and-tlsC02-streams-and-tls: Streams, TLS, and the Inspection CAThe test cases for the streams wb-proxyd takes over: the hand-off from wb-netd, the first-byte and TLS checks, upstream addresses, the HTTP request form, and the inspection CA's leaves, rotation, and keys., 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., C05-credentials-and-storeC05-credentials-and-store: Credentials and the Secret StoreThe test cases for the secret store and its callers, the signing setup that gives development builds their Keychain groups, and the credential checks wb-proxyd makes on guest requests and server responses., C06-model-apiC06-model-api: Model APIThe test cases for the model credential: its placeholder, the scan for the placeholder in whole requests, what is injected on the model API, the event log, and Claude Code end to end., C07-dependency-gateC07-dependency-gate: Dependency GateThe test cases for the dependency gate: registry paths, minimum age and known vulnerabilities, the Go checksum database clock, and Homebrew bottles from ghcr.io.
Briefs: B17-network-pathB17-network-path: Does a macOS guest work on our userspace network stack, reaching only the proxy, and how fast?Yes, with conditions., B32-dep-gate-registriesB32-dep-gate-registries: Can the dependency gate refuse young packages without breaking installs?Yes, with conditions., B33-no-guest-credentialsB33-no-guest-credentials: Can the proxy drop every credential the guest sends without breaking its tools?Yes, with conditions., B35-openshell-artifactsB35-openshell-artifacts: Do the OpenShell parts the specs reuse exist as assumed?Yes, with conditions., B36-flow-attributionB36-flow-attribution: Can projects sharing the work VM keep their network grants apart?Not as the specs are written., B40-learn-pass-modesB40-learn-pass-modes: May learn mode and pass mode open holes in default-deny egress?Learn mode should collect unknown names and refuse them, so SEC05-default-deny is unchanged., B47-non-http-streamsB47-non-http-streams: What does the gateway do with a connection that isn't TLS or HTTP?Reset it and audit the rule, unless policy names that host and port for raw TCP., B51-approval-flowB51-approval-flow: What happens between a blocked lookup and the user's answer?Hold the DNS answer for a few seconds while the notification is open, answer a refusal with a negative TTL of zero, and keep guest OS names out of notifications., B60-model-credentialB60-model-credential: Can Claude Code in the guest hold only a placeholder while the proxy adds the real subscription token?Yes, for a long-lived token from claude setup-token., B68-proxyd-stream-identityB68-proxyd-stream-identity: How does wb-proxyd know which VM and name a stream belongs to, when wb-netd may be compromised?From the per-VM socket the stream arrived on and from name reports it checked itself, so nothing wb-netd writes can widen what a stream reaches.
Design
Section titled “Design”Every packet a guest sends reaches wb-netd, the packet path. Every
TCP stream to an allowed name goes on to wb-proxyd, the stream path.
The table is in reading order. Page 20 and pages 12 to 17 continue the page above them.
Status: Draft