Which VM runs a recipe, and how does a recipe build get through the proxy?
Decided 2026-11-30: A. A recipe VM of its own, and yes to each of the other questions. The decision is in the I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image. comment that starts Decision (2026-11-30):. Source: I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image.. Adds S06-16-base-layerS06-16-base-layer: The Base LayerWhat the base layer holds, how the image build installs Apple's Command Line Tools from a package the host fetched, and the toolchain user that named images and project layers install as., S06-17-named-imagesS06-17-named-images: Named Images and RecipesThe build of a named image from a recipe on a clone of the sealed base. and S17-06-command-line-toolsS17-06-command-line-tools: Command Line ToolsThe steps by which wb-download and wb-hostd fetch and check Apple's Command Line Tools for the base layer (S06-16-base-layer).. Changes S06-01-image-layersS06-01-image-layers: Image Layers and the Toolchain PrefixThe layers of a guest image, and the toolchain prefix that project layers install into. (“Layers”, “Only the layer”, “Derivation”), S06-02-image-buildS06-02-image-build: Image BuildHow wb image build makes a guest image: the build VM, its two provisioning stages, terminfo, sealing, and storage. (“Sealing”, “The seal manifest”), S06-06-devices-and-warm-startS06-06-devices-and-warm-start: Devices, Warm Start and TimeA VM's devices and resources, saving and restoring its state, and how the guest clock follows the host., S06-07-slot-admissionS06-07-slot-admission: Slot AdmissionHow wb-hostd admits every macOS VM it starts against the limit of two, and lends the isolated VM's slot to a maintenance VM., S06-14-xcode-imageS06-14-xcode-image: The Xcode ImageHow an image gets full Xcode and the simulator runtimes from the host, as a read-only disk the host builds, and who runs Xcode's first launch., S04-00-architecture, S04-04-vm-processesS04-04-vm-processes: Per-VM ProcessesOne wb-vmd for each VM, the wb-vmd-layer entry of the Claude Code layer build, the wb-vmd-recipe entry of a named image's recipe, and wb-diskfmt, which formats a VM's new data disk. (wb-vmd-recipe), S04-05-helper-programsS04-05-helper-programs: Helper ProgramsThe programs that run once for an image build or a store operation: wb-guestadmin, wb-release-check, wb-download and wb-build-ssh., S05-03-management-commandsS05-03-management-commands: Management CommandsThe commands of wb other than the agent commands. (“wb image”), 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., S07-05-stream-hand-offS07-05-stream-hand-off: Stream Hand-offHow wb-netd hands each stream to wb-proxyd, and the checks that keep a compromised wb-netd from widening what a stream may reach., S09-03-project-settingsS09-03-project-settings: Project SettingsWhat a project's settings hold, and what a repository's own .wraithbox/ configuration may add. (image), S09-08-guest-trustS09-08-guest-trust: Guest TrustHow wb-guestd makes the guest's clients trust the VM's CAs., and S17-03-downloadsS17-03-downloads: DownloadsHow wb-download fetches what an image build needs from the internet. (wb-download-clt). Moves “macOS’s ncurses” from S06-02-image-buildS06-02-image-build: Image BuildHow wb image build makes a guest image: the build VM, its two provisioning stages, terminfo, sealing, and storage. to S16-03-around-the-streamS16-03-around-the-stream: Around the StreamWhat wb writes to the terminal around the filtered stream, the terminal environment the guest gets, and how guest text in wb's other output is escaped.. Follow-ups: I861I861 (open): Measure the paths macOS writes on a recipe VM's boot, for the seal comparisonS06-17-named-images, "The comparison" (from #150): before a recipe VM is sealed, wb-guestd compares the image with its parent's seal manifest, and fails on any entry added, removed or changed outside the toolchain…, I862I862 (open): Egress contract: the recipe VM's wb-netd and wb-proxyd path with the build policyS06-17-named-images (from #150) gives a recipe build its own VM, wb-vmd-recipe in the recipe slot (S04-04-vm-processes), with its own wb-netd and wb-proxyd path under the VM name recipe and a compiled-in build policy., I863I863 (open): wb image shell: an unsealable shell in the recipe VM for working out a recipe- wb image shell [<name] in wb and wb-hostd, on top of #674 (IMG.6c)., I868I868 (open): Probe whether installer refuses a CLT package with changed files under a kept signatureS17-06-command-line-tools, "The trust base" (from #150): wb-guestd checks Apple's signature over a Command Line Tools package's table of contents with pkgutil --check-signature, then installs it with installer..
The picture
Section titled “The picture”Figure 1. A recipe build under option A. The recipe VM has the network path a session VM has, with a compiled-in policy. The Claude Code layer’s VM stays without one. The base build itself has no guest network: the host fetches the Command Line Tools and sends them over the host-guest socket.
Options
Section titled “Options”The case for B. The Xcode step already works this way: one entry, a flag, and wb-vmd refuses the flag in any other slot. B adds nothing to sign, launch or document, and the guest side is the same in both. If wb-hostd is trusted to set the Xcode flag right, it can be trusted to set a network flag.
Confidence in A is high. The cost difference is a table row and a profile. A finding that wb-launcher entries are scarce, or that the Swift slot code can’t share a profile between two entries, would favor B.
The other questions
Section titled “The other questions”The spec takes each as recommended, and its Decisions entries wait on your answer. Each is a plain yes or no.
1. Should wb-proxyd inspect a recipe build’s TLS, with a build CA installed at runtime and removed before the seal? Recommended: yes.
- Yes: the recipe VM gets its own CA at first contact, as every VM does. The named operation
remove-trustdeletes/etc/wraithbox/before the seal, and the sealing scan refuses an image that still holds it or the CA’s certificate.wb-proxydthen enforces the build policy’s request rules:ghcr.ioonly for/v2/homebrew/core/..., theregistry-tokenrefusal, andGET,HEADandOPTIONSonly. The audit records each request. - No: Homebrew’s hosts go in pass mode during a recipe build. The guest never holds a CA, but
wb-proxydsees host names only, so none of those rules apply and the audit has host names only. - The dependency gate doesn’t decide between them. It doesn’t gate Homebrew bottles in either case (T08-homebrew-ungatedT08-homebrew-ungated: Young Homebrew bottlesHomebrew bottles from homebrew/core are not age-gated or checked against OSV., S07-12-dependency-gateS07-12-dependency-gate: Dependency GateHow wb-proxyd keeps young and vulnerable package versions from the guest on the gated registries., “Homebrew”). I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image. assumed it would cover builds, and it doesn’t.
2. Should a recipe be formulae only? Recommended: yes.
- Yes: a recipe lists
homebrew/coreformulae, installed from bottles, and an Xcode flag. It has no step that runs a command, so a tool outsidehomebrew/corebottles can’t go in an image. - No: a recipe also gets a command step, run as the toolchain user, as I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image.’s “runs as the toolchain user” allows. Any tool can then go in an image, but any code a recipe names runs as the user whose prefix every project in the VM shares (T15-shared-toolchainT15-shared-toolchain: Projects in one guest share the toolchain prefixEvery project user runs tools from the one prefix that the toolchain user owns (S06-01-image-layers, "Toolchain prefix").).
3. Should the build take the newest Command Line Tools Apple offers, with a floor, and pin no product? Recommended: yes.
- Yes: the host takes the newest product Apple’s catalog offers for the guest’s macOS, and refuses one below a compiled-in minimum or older than the last sealed base.
--allow-older-macosoverrides the second, and says so. Apple ties each release of the tools to a range of macOS versions, and the restore image follows the host. It costs two things. Every build, a layer-only one included, runs a catalog run against Apple first, and fails when Apple’s hosts can’t be reached. And a new release of the tools turns the next Claude Code update into a full rebuild, which downloads the restore image again. - No: an exact product is pinned in code, as your addition of 2026-10-07 asked (“how its version is pinned”). It needs a bump by hand for each release, because Renovate has no data source for Apple’s catalog, and it lags each new restore image. In return, a layer-only build never contacts Apple.
4. Should the toolchain user be _wbtool, UID 440? Recommended: yes.
- Yes: the name and UID X20-shared-homebrewX20-shared-homebrew: Homebrew with more than one project userCan each project user in one guest get its declared Brewfile without a Homebrew prefix that another project user can write to (SEC08-proj-isolation)? measured.
- No:
_wbtools, the name in I144I144 (closed): S06-vm-lifecycle: which user installs the base layer before sealingFrom the security review of PR #141 (X17-image-build, #28), finding 3.’s decision and I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image.’s triage, which no measurement used. Your comment of 2026-11-10 on I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image. left the pick open.
What approving commits to
Section titled “What approving commits to”- The base holds macOS,
wb-guestd,wb-guestroot, Apple’s Command Line Tools and the empty prefix, and nothing from a third party. Its build has no guest network (S06-16-base-layerS06-16-base-layer: The Base LayerWhat the base layer holds, how the image build installs Apple's Command Line Tools from a package the host fetched, and the toolchain user that named images and project layers install as.). - A third
wb-downloadentry,wb-download-clt, fetches the tools fromswscan.apple.com,swdist.apple.comandswcdn.apple.com. The host checks each package against the catalog, and the guest checks Apple’s signature against a compiled-in root before it installs anything (S17-06-command-line-toolsS17-06-command-line-tools: Command Line ToolsThe steps by which wb-download and wb-hostd fetch and check Apple's Command Line Tools for the base layer (S06-16-base-layer).). - Homebrew comes from a built-in
homebrewrecipe, pinned by tag and commit, and a new VM runs thehomebrewimage (S06-17-named-imagesS06-17-named-images: Named Images and RecipesThe build of a named image from a recipe on a clone of the sealed base.). - A seal manifest and a comparison with the parent: a named image’s seal fails when anything changed outside the prefix, the toolchain user’s home and temporary folders,
/Users, and measured lists of the paths macOS writes on boot and the build’s own operations write (I861I861 (open): Measure the paths macOS writes on a recipe VM's boot, for the seal comparisonS06-17-named-images, "The comparison" (from #150): before a recipe VM is sealed, wb-guestd compares the image with its parent's seal manifest, and fails on any entry added, removed or changed outside the toolchain…). - A project’s
imagesetting, which repository configuration can’t set, and theimage-mismatchrefusal in the work VM that names--isolated(S09-03-project-settingsS09-03-project-settings: Project SettingsWhat a project's settings hold, and what a repository's own .wraithbox/ configuration may add.). - The org layer goes from S06-01-image-layersS06-01-image-layers: Image Layers and the Toolchain PrefixThe layers of a guest image, and the toolchain prefix that project layers install into.. Recipes come only from user settings.
Evidence
Section titled “Evidence”- verified Apple’s catalog for macOS 27 (
swscan.apple.com, 508 KB gzip, 7 MB plain) listed 14 Command Line Tools products on 2026-11-29. Its path is/content/catalogs/others/index-27-26-15-14-13-12-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz. The newest,142-50405, “Command Line Tools for Xcode 27.2”, has a distribution file of 31 KB withos-version26.6 to 28.0,arm64, and one choice of nine packages. ItsCLTools_Executables.pkgis 351 MB. Probe in the builder’s scratch directory, read with Python’splistlib. The minimum the spec compiles in starts at that version, 27.2. - verified The catalog’s
Digestis the SHA-1 of a package’s compressed XAR table of contents, the bytes after its 28-byte header, not of the file. Checked forCLTools_macOS_SDK.pkgof142-50405. - verified
pkgutil --check-signatureon that package, on 2026-11-29, reportssigned Apple Softwareand the chainSoftware Update,Apple Software Update Certification Authority,Apple Root CA(SHA-256B0 B1 73 0E … 10 01 F0 24). - verified UID and GID 440 are free on a macOS 27.2.1 host.
_oahdis 441. - inferred A package whose files changed under a kept signature fails
installer: the table of contents holds each file’s checksum, and Apple’s signature covers the table of contents (XAR format).pkgutilchecks only the table of contents, and no changed package was installed. I868I868 (open): Probe whether installer refuses a CLT package with changed files under a kept signatureS17-06-command-line-tools, "The trust base" (from #150): wb-guestd checks Apple's signature over a Command Line Tools package's table of contents with pkgutil --check-signature, then installs it with installer. probes it, and ifinstallerdoesn’t refuse,wb-guestdchecks each file itself (S17-06-command-line-toolsS17-06-command-line-tools: Command Line ToolsThe steps by which wb-download and wb-hostd fetch and check Apple's Command Line Tools for the base layer (S06-16-base-layer)., “The trust base”). - assumed The paths macOS writes on every boot are few and stable enough to list in code. I861I861 (open): Measure the paths macOS writes on a recipe VM's boot, for the seal comparisonS06-17-named-images, "The comparison" (from #150): before a recipe VM is sealed, wb-guestd compares the image with its parent's seal manifest, and fails on any entry added, removed or changed outside the toolchain… measures them on a recipe VM before the comparison is built.
- assumed Homebrew doesn’t write outside its prefix, its user’s home and temporary folders when it installs bottles, and the build’s own operations write only
wbadmin’s record in/private/var/db/dslocaland the change time of/private/etc. I861I861 (open): Measure the paths macOS writes on a recipe VM's boot, for the seal comparisonS06-17-named-images, "The comparison" (from #150): before a recipe VM is sealed, wb-guestd compares the image with its parent's seal manifest, and fails on any entry added, removed or changed outside the toolchain… measures that too. A finding against it fails the seal, and doesn’t weaken it.
What this unblocks
Section titled “What this unblocks”- I672I672 (open): Base layer: install the host-fetched Command Line Tools, create the toolchain user and its prefix, and write the guest's npm configurationPackage IMG.6 of docs/implementation-plan.md, part 1 of 4 (IMG.6a)., I673I673 (open): wb-guestd: run Homebrew as the toolchain user, write the formula data snapshot, and install a formula closure from bottlesPackage IMG.6 of docs/implementation-plan.md, part 2 of 4 (IMG.6b)., I674I674 (open): Named images from recipes: recipe loader, the derived build on a clone of the base, provenance, and wb image build <name>Package IMG.6 of docs/implementation-plan.md, part 3 of 4 (IMG.6c). and I675I675 (open): Base layer and a named image in a VM: Command Line Tools, the toolchain prefix, and a recipe build through the build policyPackage IMG.6 of docs/implementation-plan.md, part 4 of 4 (IMG.6d)., the IMG.6 packages of V1-M7-image-buildV1-M7-image-build: Image buildwb image build downloads the restore image and the Command Line Tools, installs and provisions a VM over the build network, installs the minimal base layer, and installs Claude Code in its own top layer..
- I653I653 (open): wb-download and wb-hostd: the Command Line Tools entryPackage IMG.1 of docs/implementation-plan.md, part 4 of 4 (IMG.1d)., the Command Line Tools entry in
wb-download. - I861I861 (open): Measure the paths macOS writes on a recipe VM's boot, for the seal comparisonS06-17-named-images, "The comparison" (from #150): before a recipe VM is sealed, wb-guestd compares the image with its parent's seal manifest, and fails on any entry added, removed or changed outside the toolchain… (boot paths), I862I862 (open): Egress contract: the recipe VM's wb-netd and wb-proxyd path with the build policyS06-17-named-images (from #150) gives a recipe build its own VM, wb-vmd-recipe in the recipe slot (S04-04-vm-processes), with its own wb-netd and wb-proxyd path under the VM name recipe and a compiled-in build policy. (the recipe VM’s egress contract), I863I863 (open): wb image shell: an unsealable shell in the recipe VM for working out a recipe- wb image shell [<name] in wb and wb-hostd, on top of #674 (IMG.6c). (
wb image shell).
Details and glossary
Why the base has no network. The maintainer’s addition of 2026-10-07 on I150I150 (closed): S06-vm-lifecycle: minimal base image and named derived images built from recipesS06-vm-lifecycle "Images" puts Homebrew, the Xcode command line tools and wb-guestd in the base image.. Anything the base build fetched from the guest would need a policy and a proxy for the build VM, and would run downloaded code before the seal. With the host fetching the tools through wb-download, which is confined and audited, the build VM’s network stays the one SSH connection of S07-18-build-networkS07-18-build-network: Build NetworkThe build VM's network: what its wb-netd serves, the one connection to the guest's port 22, and its refusal for session VMs..
Why one level. A named image derives from the base only. A recipe can include other recipes, but images don’t chain, so a rebuild of the base rebuilds every image from its recipe, and no image holds state from an image the user no longer has.
What the comparison can’t catch. A local privilege escalation from the toolchain user to root in the recipe VM defeats every check in the guest, as it would any seal. Formulae only, from bottles, narrows the code that runs to homebrew/core and Homebrew itself.
Glossary
- Command Line Tools (CLT): Apple’s compilers,
git,makeand SDK headers, without the Xcode app. - Software update catalog: Apple’s unsigned property list of products, with each package’s URL, size and digest.
- XAR: the archive format of a macOS
.pkg. Its table of contents lists every file with a checksum, and Apple signs the table of contents. - Recipe: a TOML file in the user’s settings that names formulae, included recipes and an Xcode flag.
- Seal: the scan that makes an image usable, run as root in the guest before any project code.
- Toolchain user: the one account that may write the tool prefix. Project users only read it.