Monday, October 26, 2026

Building reproducible confidential VM images with cvmimage

Building reproducible confidential VM images with cvmimage

cvmimage produces hermetic, byte-for-byte reproducible confidential virtual machine images for AMD SEV-SNP and Intel TDX, aimed at secure inference and auditable compute in authorized environments.

Tooltinfoilsh/cvmimage — reproducible confidential VM image builder for AMD SEV-SNP and Intel TDX written in Go
CategoryConfidential computing / hardened VM image build tooling
Primary UseBuilding measured, hermetic CVM images (tinfoilcvm.raw, tinfoilcvm.vmlinuz, tinfoilcvm.initrd, tinfoilcvm.roothash) for secure inference and custom compute workloads
Safe UseIntended for authorized engineers building hardened infrastructure for their own confidential computing deployments, labs, and supply-chain audits
Telemetry NotePurely a build tool: it produces local artifacts and leaves a result symlink plus measured outputs; its output is designed to be verified via the published .roothash rather than observed as network activity

Reproducibility is the promise at the center of tinfoilsh/cvmimage, a small but sharply focused project that builds a Tinfoil Confidential Virtual Machine image for AMD SEV-SNP and Intel TDX hardware. The README is unusually disciplined in its claims: every byte of the final image is explicitly declared and derived from pinned inputs, the build is hermetic and byte-for-byte reproducible, and the complete source-to-measurement graph is auditable by anyone. That last clause matters more than it first appears, because confidential computing is only as strong as the attestation story behind it — a CVM whose image contents cannot be independently reconstructed forces operators to trust the publisher rather than verify the measurement.

The tool is written in Go, licensed AGPL-3.0, and lives on the main branch with a modest but real community around it. There are no topics tagged and no marketing fluff in the README, which is consistent with the project's character: this is infrastructure plumbing for people who already understand why a measured boot chain matters. The artifacts it emits are the standard vocabulary of confidential computing on x86 — tinfoilcvm.raw, tinfoilcvm.vmlinuz, tinfoilcvm.initrd, and crucially tinfoilcvm.roothash. The roothash is the anchor that ties the whole reproducibility argument together, since it is the value a verifier can recompute from an independent rebuild and compare against what the publisher signed.

Mechanically, the build system is Nix, and the README is explicit that you must use the pinned Nix release rather than whatever happens to be on your host. On an x86_64 Linux host without Nix preinstalled, the first step is ./nix/install.sh, followed by exporting the profile path into PATH. This pinning is not incidental: Nix's functional, content-addressed model is what makes the hermetic build tractable in the first place, because every dependency resolves to an immutable store path rather than a floating version. If the build tool itself drifted between releases, byte-for-byte reproducibility would be unattainable no matter how disciplined the image definition was.

The actual invocation is a single command once the environment is prepared: nix-build -I . -A shipping-image -o result. The -A shipping-image attribute selects the release artifact set, and -o result symlinks the output into the working directory. That is the entire user-facing surface — no long flag matrix, no configuration file to fumble through in the README. Additional depth is delegated to docs/build.md, which suggests the maintainers expect readers to graduate from the quickstart into the details of the build graph rather than drowning them upfront.

What the README describes as a hermetic build deserves unpacking for anyone evaluating this tool. Hermeticity means the build draws exclusively from declared, pinned inputs — no ambient network fetches, no host toolchain leakage, no implicit state. Combined with reproducibility, this gives you a property that most cloud images categorically lack: two engineers on different machines, building at different times, should produce identical bytes in tinfoilcvm.raw and therefore an identical hardware measurement when the image boots under SEV-SNP or TDX. In confidential computing terms, that converts the attestation report from an opaque trust decision into a checkable claim.

The dual-platform support for AMD SEV-SNP and Intel TDX is the other structurally significant fact. These are the two dominant CPU-level confidential computing technologies on x86 servers, and they differ meaningfully in how they measure guest state, so shipping a single image definition that targets both implies the project has abstracted the platform-specific attestation and measurement details somewhere in its build graph. For operators with heterogeneous fleets, that abstraction is where most of the maintenance burden — and most of the risk of subtle divergence — will live.

The stated workloads are secure inference and custom compute, which fits the current wave of confidential ML deployments where model owners and data owners mutually distrust the host. A reproducible CVM image is the foundation layer of that story: before you can prove to a client that their prompts never touch unencrypted host memory, you need to prove what code is actually running inside the enclave. This project addresses exactly that foundational gap, leaving the attestation-brokerage and key-management layers to other components.

From a defensive and supply-chain perspective, cvmimage is best read as a hardening tool rather than an offensive one. Its entire value proposition is verifiability: reducing the trust surface of a VM image from the publisher's build infrastructure down to a hash an auditor can recompute. Teams evaluating vendor confidential computing offerings could plausibly use this repository as a reference model for what a fully auditable image pipeline should look like, even if they never boot the resulting artifacts.

Operationally, there are a few things a prospective adopter should verify before depending on it. First, reproduce a build and confirm the emitted tinfoilcvm.roothash matches the published value — the README's auditability claim is only real if you exercise it. Second, check how the pinned inputs in the Nix lockstate are updated over time, since a reproducible build of stale dependencies is reproducibly vulnerable. Third, read docs/build.md before treating the quickstart as sufficient for production, because measurement and boot-configuration details for SEV-SNP versus TDX will almost certainly diverge there.

In a landscape where confidential computing marketing often outpaces verifiability, tinfoilsh/cvmimage takes the opposite bet: fewer features, fully pinned inputs, and a build graph anyone can replay. It is niche by design, AGPL-3.0 licensed, and clearly aimed at engineers building authorized secure-inference or custom-compute infrastructure who refuse to take a vendor's image on faith. For that audience — and for defenders studying what trustworthy image pipelines look like — it is a repository worth reading closely even if the build itself never leaves your lab.

Official project repository for tinfoilsh/cvmimage.
Download Tool

Educational analysis for authorized security professionals. Use only in controlled, authorized environments.

Share articleFacebookXLinkedIn

Continue exploring

Browse all articles →

0 comentários:

Post a Comment

Note: Only a member of this blog may post a comment.