Skip to content

feat(tee-vm): dedicated snp-tools release stream, pinned in build-config - #637

Merged
kariy merged 1 commit into
mainfrom
feat/tee-vm-prebuilt-snp-digest
Jul 14, 2026
Merged

feat(tee-vm): dedicated snp-tools release stream, pinned in build-config#637
kariy merged 1 commit into
mainfrom
feat/tee-vm-prebuilt-snp-digest

Conversation

@kariy

@kariy kariy commented Jul 14, 2026

Copy link
Copy Markdown
Member

Why

Every tee-vm-v* release rebuilt snp-digest from scratch just to compute its measurement, and #636's installer additionally required a Rust toolchain on every SNP host to verify measurements. The verifier changes far less often than the VM image — it should be released once and reused.

What

  • New amdsev-snp-tools-release workflow (dispatch with a version): cargo test --locked, build, smoke-run, publish snp-tools-v<X.Y.Z> with snp-digest-<tag> + a bare-hex .sha256. Release notes print the exact pin lines to adopt it.
  • build-config pins the chosen release (SNP_DIGEST_RELEASE + SNP_DIGEST_SHA256) — the checksum is trusted because build-config is versioned in git at the consuming tag, so the pin travels with every tee-vm tag.
  • amdsev-release.yml: "Build snp-tools" → "Obtain snp-digest": downloads the pinned binary (checksum-verified, smoke-run) to compute the published measurement, so the publisher and every verifying host run the identical binary; release notes name the pinned verifier. Empty pins fall back to the source build.
  • install.sh: reads the pins from the installed tag's build-config (sed extraction, not sourcing), downloads once with checksum + smoke-run gates, caches across re-runs, and drops the binary where verify-build.sh's discovery already looks. Fallback chain: pinned prebuilt → cargo build → checksum-only with a loud warning. Also hardens all downloads with connect timeouts, retries, and a 1 KB/s speed floor — a rate-limited GitHub API call used to hang the install indefinitely.
  • The prebuilt is a convenience copy, never the trust root: auditors rebuild from the snp-tools tag's pinned source, and its checksum deliberately stays out of build-info.txt so reproduce-release.sh is unaffected. Docs updated (release-pipeline.md stream + runbook, install.md prerequisites).

Validation

shellcheck clean (CI set), 46 unit tests green (test-install.sh, incl. new build_config_get extraction tests), actionlint clean on both workflows, and a live --dry-run install against the just-published tee-vm-v0.3.0+katana-v1.8.0-rc.8 (no pins there yet → correct source-build fallback messaging).

Rollout

  1. Merge; dispatch amdsev-snp-tools-release with 0.1.0.
  2. Follow-up PR bumps the two build-config pins from the release notes — from then on neither the release pipeline nor any SNP host builds snp-digest.

🤖 Generated with Claude Code

snp-digest changes far less often than the VM image, so publish it once as
a snp-tools-v* GitHub release (new amdsev-snp-tools-release workflow: test,
build --locked, smoke-run, publish snp-digest-<tag> + .sha256) instead of
rebuilding it inside every tee-vm release.

Consumers pin one release via SNP_DIGEST_RELEASE + SNP_DIGEST_SHA256 in
build-config — trusted because build-config is versioned in git at the
consuming tag. The tee-vm release pipeline downloads the pinned binary
(checksum-verified) to compute the published measurement, and install.sh
downloads the same binary on SNP hosts, so measurement verification needs
no Rust toolchain; the publisher and every verifier run identical code.
Empty pins (and tags predating them) fall back to building from source —
the prebuilt is a convenience copy, never the trust root, and its checksum
stays out of build-info.txt so reproduce-release.sh is unaffected.

Also hardens all installer downloads with connect timeouts, retries, and a
transfer-speed floor — a rate-limited GitHub API call used to hang the
install indefinitely.

Rollout after merge: dispatch amdsev-snp-tools-release (0.1.0), then bump
the two build-config pins from the release notes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@kariy
kariy merged commit 32459c4 into main Jul 14, 2026
4 checks passed
@kariy
kariy deleted the feat/tee-vm-prebuilt-snp-digest branch July 14, 2026 17:43
kariy added a commit that referenced this pull request Jul 15, 2026
Sets the two `build-config` pins introduced in #637 to the freshly cut
[`snp-tools-v0.1.0`](https://github.com/dojoengine/katana/releases/tag/snp-tools-v0.1.0)
release. The SHA-256 matches both the published `.sha256` asset and a
locally re-downloaded copy of the binary. From the next `tee-vm-v*`
release onward, the release pipeline and `install.sh` download this
pinned verifier instead of building `snp-tools` from source.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant