REFERENCE

Building a golden image

Your detonation host needs the signed Windows image its sandboxes are cloned from, or a release asks you to rebuild it, and you want to know what the build takes.

UPDATED

The golden image is the Windows disk every sandbox VM is cloned from. Each run gets a fresh copy, so nothing one installer does is still there for the next. Attestree publishes no image. Each operator builds one from their own Windows ISO with the golden-image tools kit, signs it with a key they hold, and plants the public half of that key on the broker host, which refuses any image that key did not sign. Without an image, nothing is verified.

This page covers what the build needs and does, in the order the platform’s own runbook gives. Attaching brokers, timeouts and VM sizes are on brokers and detonation hosts. What a run then does is on how a version is tested.

The tools kit

The kit is a zip, wep-golden-image-tools-<version>-win-x64.zip, attached to each platform release with a Sigstore bundle beside it. Platform releases are not public yet, so this site cannot link it. Check the bundle with cosign 3.0.6 or newer before you unpack the zip, and take the kit from the release your platform runs. The sandbox agent, Syft and the image’s hardening are baked into the image, so a fix to any of them reaches your runs only through an image built with that release’s kit.

The kit holds:

  • tools\: wep-golden-vhdx-build, which assembles the image, wep-golden-vhdx-sign and wep-golden-vhdx-verify.
  • sandbox-agent-publish\: the sandbox agent the build bakes into the image.
  • broker-cli\: the broker program, used on the build host only for its ceremony verbs that make and use the signing key. Run it from the kit, and never register it as a service there.
  • golden-vhdx\: the pinned download addresses and SHA-256 digests of the Visual C++ 2015–2022 runtime installers, and the Syft pin: syft.version and syft.sha256, the digest of Syft’s Windows release archive.
  • MANIFEST.txt: the kit’s version, the commit it was built from, and the SHA-256 of each program.

Unpacking it puts nothing on PATH.

What the build host needs

  • Windows with Hyper-V turned on, and PowerShell 7 in an elevated session. The build applies Windows to a new virtual disk and edits it offline. For Proxmox the build host is a separate machine, because the broker VM has no Hyper-V.
  • Your own Windows ISO and licence. The sandboxes run Windows under your licence. The platform’s runbooks build Windows 11 client images, and you choose the edition by its index in the ISO, which Get-WindowsImage lists. The build pins the ISO by its SHA-256, which you compute first.
  • Syft, which writes each run’s SBOM inside the sandbox. The kit does not carry it. Download the Windows release archive of the version the kit’s syft.version names (v1.52.0 as of platform 26.11.800) from Syft’s GitHub releases, and give the build the zip as it is. The build checks it against the Syft pin compiled into the tool, refuses any other archive with SyftArchiveRefused before it mounts anything, and extracts syft.exe itself. Since 26.11.800 the tool refuses the old --syft-path and --syft-sha256 options, so a command copied from an older runbook stops before it builds anything.
  • The two Visual C++ runtime installers, x64 and x86, from the addresses in the kit’s golden-vhdx\ folder. The build checks both against the kit’s digests before it touches the disk, and the image installs them at first boot, so an installer that needs the runtime does not stop on a missing-DLL dialog. Each sandbox VM spends tens of seconds on that as it starts.
  • qemu-img on PATH, for a Proxmox template only.
  • Disk. Each image is a dynamic VHDX that can grow to 40 GiB by default (--vhdx-size-gb), and you keep the previous images for a rollback; a Proxmox build adds the converted template. On a Hyper-V broker host every detonation runs on a full copy of the image, so that host needs room for one copy per detonation it runs at once.

Two images on Hyper-V

A Hyper-V broker can hold several images, each under the logical name its sidecar file gives. Two matter:

  • The headless image, which most runs use. Its name is whatever your Detonation defaults, or a broker’s own Edit image and timeout, asks for; the platform’s runbooks call it win11-pro-baseline. A run on it installs as SYSTEM with nobody signed in.
  • The per-user image, win11-pro-interactive. Built with one more option, it signs a standard test user in automatically, so a per-user installer can run in that user’s session. The user lane asks for it by exactly that name, and a broker’s drawer refuses it as the broker’s own image. Without it, per-user installers are not re-run as a user: see the user lane.

Since the 26.11.1900 broker MSI a Proxmox broker can serve more than one template: its default, and further ones such as the per-user win11-pro-interactive, built as above and converted with --proxmox-template. Since the 26.11.2000 broker MSI the setup wizard stages each one, from --further-templates <file>, and a run’s golden image picks the template it clones.

Build and sign

On the build host, in one elevated PowerShell 7 session with the kit unpacked and its tools\ folder on PATH:

  1. Build the headless image with wep-golden-vhdx-build. It takes the ISO and its SHA-256, the edition index, Syft’s release archive (--syft-zip-path), the kit’s sandbox-agent-publish\ folder, the four --vcredist-* options (both installers, each with the kit’s digest) and an output path, plus three options that make it a detonation image:

    • --client-oobe skips Windows’ first-run setup and starts the sandbox agent at first boot.
    • --harden-for-detonation turns off Defender, SmartScreen, Windows Update, the Store and telemetry, so they neither block an installer nor show up in its evidence. It also keeps a Windows service’s listener and eight of Windows’ own scheduled tasks from showing up as the installer’s. Since 26.11.700 it also stops the image’s own Windows Update and settings requests, which a network-capturing run would otherwise record as the package’s traffic; the build record then lists windows-update-and-settings-quieted. Since 26.11.900 it also quiets Edge’s background traffic; the build record then lists edge-background-quieted. Since 26.11.2000 it also sets the Edge Update service to manual start, and the image’s first boot disables Edge Update’s scheduled tasks before the agent starts, so Edge’s background updater no longer starts during a run. An installer can still start the service when it needs it.
    • --cut-label names this build, in 1 to 64 letters, digits and . _ : + -, starting with a letter or digit. Every result run on the image carries the label, and a version’s Evidence tab shows it as the golden cut.

    Pass --agent-commit, the commit line of the kit’s MANIFEST.txt, too. --syft-version is optional, and a version other than the pinned one is refused. The build writes the commit, the pinned Syft version, the digests it checked (the syft.exe it extracted among them) and its options into C:\Wep\golden-build.json inside the image, with a copy, golden-build.staging.json, beside the image file. The sandbox agent copies that record into every result.

  2. Build the per-user image the same way, adding --detonation-interactive and writing to another file. At first boot it creates the test user with a password the build makes up, stored in the image’s registry rather than its answer file, and the sandbox agent removes the stored sign-in before the installer runs. The build also quiets that user’s first sign-in: no OneDrive setup and, since platform 0.242.2, none of the 37 apps Windows would otherwise register partway through a run.

    # The kit unpacked to C:\WepTools; $commit and the two runtime digests read beforehand.
    $iso     = 'D:\isos\Win11_x64.iso'
    $isoSha  = (Get-FileHash $iso -Algorithm SHA256).Hash.ToLowerInvariant()
    $syftVer = (Get-Content 'C:\WepTools\golden-vhdx\syft.version' -Raw).Trim()   # v1.52.0 in the 26.11.800 kit
    $syftZip = "C:\WepVhdx\inputs\syft_$($syftVer.TrimStart('v'))_windows_amd64.zip"
    Invoke-WebRequest "https://github.com/anchore/syft/releases/download/$syftVer/$(Split-Path $syftZip -Leaf)" -OutFile $syftZip
    $common = @(
      '--iso-path', $iso, '--iso-sha256', $isoSha, '--image-index', '6',   # your edition's index
      '--syft-zip-path', $syftZip,
      '--agent-publish-dir', 'C:\WepTools\sandbox-agent-publish', '--agent-commit', $commit,
      '--cut-label', 'golden-2026-11-03', '--client-oobe', '--harden-for-detonation',
      '--vcredist-x64-path', 'C:\WepVhdx\inputs\vc_redist.x64.exe', '--vcredist-x64-sha256', $vcX64Sha,
      '--vcredist-x86-path', 'C:\WepVhdx\inputs\vc_redist.x86.exe', '--vcredist-x86-sha256', $vcX86Sha)
    wep-golden-vhdx-build @common --output-vhdx 'C:\WepVhdx\baseline\win11-pro-baseline.vhdx'
    wep-golden-vhdx-build @common --detonation-interactive --output-vhdx 'C:\WepVhdx\interactive\win11-pro-interactive.vhdx'
    
  3. Make the signing key, once per build host, with Wep.Detonation.Broker.exe ceremony kvm-keygen from the kit’s broker-cli\ folder. It creates an ECDSA P-256 key pair, keeps the private key DPAPI-protected on the build host, and prints where the public key is. The private key never leaves that machine. It refuses to replace an existing key unless you pass --overwrite, because a new key needs a new trust anchor on every broker. The same key signs a Proxmox template record.

  4. Sign each image with wep-golden-vhdx-sign. Give it --logical-name (win11-pro-baseline or win11-pro-interactive) and --windows-version. Give it also the build facts its provenance records: the ISO digest; the Syft version and digest as the build recorded them in golden-build.staging.json, never a hash you compute from a file on the build host; the runtime installers; the kit’s commit and version; and when the build started and finished. --help lists every option. With WEP_VHDX_SIGNING_KEY_BASE64 unset, it signs with the key from step 3. It writes <image>.vhdx.sig, the sidecar <image>.vhdx.json that names the image, and two in-toto statements about the build: SLSA provenance in the golden VHDX build type (slsa.in-toto.json) and the golden VHDX build record of its inputs (wep.in-toto.json). Neither statement is signed itself; the image is. It also prints the public key.

  5. Verify each image with wep-golden-vhdx-verify against that public key.

  6. Boot a throwaway copy of each image once. Use a differencing disk in a Generation 2 VM with no network adapter, so the image file itself is never written: a booted image no longer matches its signature. First boot should finish Windows setup, start the sandbox agent and, with nothing to install, shut the VM down by itself. The platform’s own runbook gates every new image on a scripted version of this check; that script is not in the kit.

Hand the image to a Hyper-V broker

  1. Plant the public key on the broker host, under a name of your choice. The broker trusts every key planted there inside its NotBefore–NotAfter window, so an old key and a new one can overlap.

    $anchor = 'HKLM:\SOFTWARE\Wep\Detonation\TrustedVhdxKeys\golden-2026-11'
    New-Item -Path $anchor -Force | Out-Null
    Set-ItemProperty -Path $anchor -Name PublicKeyBase64 -Value '<the public key the sign step printed>'
    Set-ItemProperty -Path $anchor -Name NotBefore -Value (Get-Date).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
    Set-ItemProperty -Path $anchor -Name NotAfter -Value (Get-Date).AddYears(1).ToUniversalTime().ToString('yyyy-MM-ddTHH:mm:ssZ')
    
  2. Copy each image’s three files, .vhdx, .vhdx.sig and .vhdx.json, into the broker’s baseline folder, keeping the names together. The folder is whatever Wep__Broker__Detonation__GoldenVhdxBaselineScanner__BaselineDir names in the broker service’s environment; there is no default. When you add that value, keep the service’s other environment values, because replacing the whole list drops them. Keep one image per logical name in the folder.

  3. Restart the broker. It reads the folder only when its service starts. A background scan then checks each image’s signature against the planted keys and advertises the logical names of the images that pass, and the console lets a broker use only an image it advertised. The broker’s Windows events say how it went:

    • 1110 and 1111 mark the scan’s start and end, with how many images it approved and skipped. A skipped image is named in the broker log under %ProgramData%\Wep\Broker\logs\, for example with failed signature verification; skipping. An image with no sidecar is skipped too.
    • 1112: the scan itself failed, and the broker refuses every detonation until it is restarted.
    • 1113: the baseline folder is not set, or does not exist.
    • 1114: an earlier start approved images, and this one found none.

Then choose the image in Detonation defaults on the Brokers page, or in one broker’s drawer, as brokers and detonation hosts describes, and ingest a package you know to see a first run attest.

A Proxmox template

For Proxmox, build and sign the headless image as above. Then, on the build host:

  1. Convert it with wep-golden-vhdx-build --proxmox-template. It first checks the image’s signature against your public key, and refuses an image that changed after signing. On a copy, it adds the QEMU guest agent from a folder you give it and converts the disk with qemu-img: qcow2 for a file-based storage pool, which the wizard’s path uses, or raw for an LVM or ZFS pool. The signed image is never changed.
  2. Boot the image once on Hyper-V, and the converted template once under Proxmox, before you trust it.
  3. Sign the template record with ceremony kvm-sign-record, giving the VMID the template will have. The record binds the template’s digest to that VMID, signed with the same key. Since 26.11.1900 the conversion writes a wep-kvm-image-v2 precursor, and kvm-sign-record signs a v2 record only from --precursor-json; its field flags still sign a v1 record. A broker older than 26.11.1900 refuses a v2 record as TemplateIntegrityInvalid, so move the broker to that release’s MSI before you stage the template.
  4. Give the broker VM only the record, its signature and the public key, never the private key or the build tools. The bring-up wizard takes those three with the template’s download address, stages the template and plants the key. Proxmox checks the template’s bytes once, as it imports it: the wizard gives it the record’s digest, and Proxmox refuses an image that does not match. After that the template lives on the Proxmox host, where the broker cannot re-hash it. Before each clone the broker checks the record it holds instead: its signature, that it names the VMID about to be cloned, and that its digest is the one configured. Brokers and detonation hosts covers the wizard.

After a release: re-cut the image

When a release note says a fix “takes effect after a golden-image rebuild with this release’s tools kit”, re-cut. The platform’s runbook does it in this order:

The 26.11.1900 and 26.11.1901 tools kits cannot build an image from a Windows ISO, and the 26.11.2000 kit builds golden images again. With those two kits, wep-golden-vhdx-build stops within seconds, before it writes an image, with the outcome DismCmdletFailed, and leaves the ISO mounted: dismount it with Dismount-DiskImage -ImagePath <the ISO's path>. Build from the 26.11.2000 kit or a later one.

A build can report success although one of its steps failed (a known issue in 26.11.2000). When a step inside wep-golden-vhdx-build fails, for example writing one of the --harden-for-detonation registry settings or the boot files, the build goes on, still reports the image as built, and does not name the step. Before you put a new golden into service, boot it once on Hyper-V, as step 5 below does, and read the image’s registry back for the settings --harden-for-detonation makes. Keep your previous golden until the new one passes both. A fix comes in a later release.

  1. Upgrade first. Run the release on the platform, and its broker MSI on the broker, before the new image goes in, so the platform can read everything the new image reports.
  2. Drain. No re-test sweep is armed, and nothing is in the detonation queue.
  3. Back up the current images, each with its .sig and .json, to a folder outside the baseline folder, and leave their key planted.
  4. Build both images from the ISO with the new kit, under a new cut label and the same logical names, so no setting changes. Never edit the current image by hand.
  5. Sign, verify and boot-check them as above. A new signing key gets its own entry beside the old one.
  6. Swap. Stop the broker, replace the files under the same names, start it, and wait for the scan to approve every image. A signature failure here means rolling back.
  7. Check runs on the new image with versions the catalog does not hold yet: one machine-wide install, one per-user install, and one that runs longer than ten minutes. Each should attest, and its Evidence tab should name the new sandbox agent and golden cut and carry an SBOM. Its scheduled tasks must read as assessed, because a run that could not read them proves nothing about the image. The per-user run’s evidence also says how long the test user’s first sign-in took to settle.
  8. Re-test one attested version from its page, as a canary.
  9. Arm the re-test sweep on that canary’s run, so every attested version runs again on the new image.

Rolling back. Cancel any sweep and wait until nothing is queued, stop the broker, put the backed-up files back, and start it. Re-detonate whatever the new image left failed. A fixed image gets a new cut label. Keep the backups and the old key until two weeks after a sweep on the new cut completes.

Where this stops

  • No download here yet. The tools kit ships with each platform release, and those releases are not public. Until they are, or until this site publishes the kit, these steps describe the build without its files.
  • No image is published. You need your own Windows ISO and licence, and a Hyper-V machine to build on, even for Proxmox.
  • Syft is not in the kit, only its pin, and neither is the scripted boot check the platform’s own runbook uses. The manual boot above shows that first boot works; it does not measure what Windows adds to a new user’s profile during a per-user run.
  • A broker reads its images only at start, so adding or replacing one means a restart, best done with the detonation queue empty.
  • Proxmox serves more than one template only from the 26.11.1900 broker MSI; an earlier broker serves its default template alone.
  • Build time. The platform states none.