image(uv): derive the checksum from the attested release tarball - #467
Merged
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
nozaq
marked this pull request as ready for review
September 12, 2026 07:23
uv's committed checksum was fetched from releases.astral.sh, which serves the sum the release workflow wrote next to the tarball, so the build trusted whatever that release carried. uv attests every release archive with actions/attest-build-provenance, so the checksum can be derived the way pnpm's is: checksum.sh downloads the tarball, has `gh attestation verify` bind its digest to uv's release workflow, and prints the sha256 line that update-material.sh commits. The release workflow is dispatched on main and creates the version's tag at the commit it ran on, so the certificate carries refs/heads/main as the source ref rather than a tag. The script therefore resolves the tag to its commit with git ls-remote and passes it as --source-digest, which is what ties the tarball to the pinned version. The runner is GitHub-hosted, so --deny-self-hosted-runners applies as well. The committed files are unchanged: sha256sum prints the same line the previous source served. Deno stays on the checksum its release publishes: its CI computes the sums with shasum and uploads them beside the archives, with no attestation step, and the Sigstore log holds no entry for the pinned archives. The Deno wording is corrected to say what that checksum guarantees, since it comes from the same release as the archive. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
nozaq
force-pushed
the
claude/deno-sha256-tofu-osbman
branch
from
September 12, 2026 07:24
9435d90 to
aba886b
Compare
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uv's committed checksum was fetched from releases.astral.sh, which serves the sum uv's release workflow wrote next to the tarball, so the build trusted whatever that release carried. uv attests every release archive with
actions/attest-build-provenance, so the checksum is now derived the way pnpm's is:uv/checksum.shdownloads the tarball, hasgh attestation verifybind its digest to uv's release workflow, and prints the sha256 line thatupdate-material.shcommits.uv/build.yamldeclares the materials ascommandentries instead ofurlentries.Verify flags
uv's
release.ymlisworkflow_dispatched onmainand creates the version's tag at the commit it ran on (gh release create ... --target $RELEASE_COMMIT), so the signing certificate carriesrefs/heads/mainas the source ref rather than a tag. The script resolves the tag to its commit withgit ls-remoteand passes it as--source-digest, which is what ties the tarball to the pinned version. The certificate for the pinned tarballs (both architectures) namesastral-sh/uv/.github/workflows/release.yml, a GitHub-hosted runner, and commit0ebbd927, the commit tag0.12.13points to, so--deny-self-hosted-runnersapplies as well.Deno
Deno is left on the checksum its release publishes. Its CI computes the sums with
shasumand uploads them beside the archives, there is no attestation step in any of its workflows, and the Sigstore transparency log holds no entry for either pinned archive digest, so there is nothing forgh attestation verifyto check. The Deno wording in the README,build.yaml, and the Dockerfile is corrected to say what that checksum actually guarantees: it comes from the same release as the archive, and pinning it protects against a later swap of the download, not against the release itself.Verification
shellcheck uv/checksum.shis clean.scripts/update-material.sh uvwith a stubghreports both materials unchanged:sha256sumprints the same line the previous source served, souv-amd64.sha256anduv-arm64.sha256are byte-identical.scripts/dockerhub-overview.shrenders both READMEs.gh attestation verifycould not be run in this environment; theupdate-material.ymlrun on this PR exercises it, since*/checksum.shand*/build.yamlchanged.🤖 Generated with Claude Code
Generated by Claude Code