fix(release): repair the two failures that left v0.4.3 unsigned - #7
Merged
Conversation
…g of one The closure check read every Requires-Dist from the wheel and demanded each name appear in the SBOM, skipping only lines containing the literal string "extra ==". That is a hand-rolled evaluation of exactly one marker, and it is blind to every other one. `tzdata; sys_platform == "win32"` carries no extra, so it was demanded on the ubuntu runner that builds the SBOM -- where it is correctly not installed, because the marker says so. The job failed the v0.4.3 release with SBOM lists 3 components but is missing 1 of provide-foundation's dependencies (tzdata) -- wrong environment Two commits in that same release collided: 61f2230 added this proof, and 74c6ba4 added the first conditional dependency this project has ever had. Neither was wrong alone, and no earlier release could have caught it. Markers are now evaluated with packaging, against an empty `extra` -- which is what makes `extra == "cli"` false, since no extra was requested when the wheel was installed. The checker runs under the venv's own interpreter rather than the runner's, because the only environment whose marker answers mean anything here is the one the SBOM describes. packaging is installed after the SBOM is generated. That order is load-bearing: this venv is the environment the document describes, so installing it earlier would publish packaging as a component of the release. An unparseable Requires-Dist now fails with the offending line rather than an InvalidRequirement traceback. Verified against a fresh `uv build` of 0.4.3: - main's script reproduces the CI failure verbatim, on macOS, same reason. - this one reports "describes provide-foundation 0.4.3 with 3 dependencies", listing attrs, structlog and tomli_w -- and not packaging. - dropping structlog from the generated SBOM still fails the check, so it has not been weakened into always passing.
…rifies Both signing steps pinned sigstore/gh-action-sigstore-python at v3.0.0, from July 2024. That version installs `sigstore ~= 3.0`, and sigstore-python 3.x bundles a TUF root that can no longer verify Sigstore's production root: tuf.api.exceptions.UnsignedMetadataError: root was signed by 0/3 keys raised from TrustedRoot.production() before anything is signed. Signing does not degrade here, it aborts -- so a release reaches PyPI and the GitHub release gets no artifacts and no signatures at all. Seen on the v0.4.3 repair dispatch, which fetched the published artifacts from PyPI successfully and then failed on the signing step. v3.1.0 moved the action to sigstore-python 4.x for Rekor v2 compatibility; v3.5.0 is current. `rekor-version` still defaults to 1 in the action's 3.x series, so the bundles this produces keep the same format and the `dist/*.sigstore.json` upload glob is unaffected. Pinned by commit SHA as before, with a note at both call sites recording why pinning back below v3.1.0 breaks signing.
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.
v0.4.3 reached PyPI but its GitHub release has 0 assets and no signatures. Two independent failures, one per commit here.
1. SBOM: marker matched as a substring instead of evaluated
scripts/sbom_from_wheel.shdemanded everyRequires-Distname appear in the SBOM, skipping only lines containing the literal"extra ==". That is a hand-rolled evaluation of one marker, blind to every other.tzdata; sys_platform == "win32"carries no extra, so it was demanded on the ubuntu runner that builds the SBOM — where the marker correctly keeps it uninstalled:Two commits in the same release collided:
61f22308added the closure proof,74c6ba45added the first conditional dependency this project has ever had. Neither was wrong alone, and no earlier release could have caught it.Markers are now evaluated with
packaging, against an emptyextra(which is what makesextra == "cli"false — no extra was requested when the wheel was installed). The checker runs under the venv's own interpreter, because the only environment whose marker answers mean anything is the one the SBOM describes.packagingis installed after generation; that order is load-bearing, or it would be published as a component of the release.Verified against a fresh
uv buildof 0.4.3:main's scriptSBOM describes provide-foundation 0.4.3 with 3 dependencies— attrs, structlog, tomli_w, and not packagingstructlogfrom the SBOM, re-check2. Sigstore: signing aborts on a trust root that no longer verifies
Both signing steps pinned the action at v3.0.0 (July 2024), which installs
sigstore ~= 3.0. sigstore-python 3.x bundles a TUF root that can no longer verify Sigstore's production root:raised from
TrustedRoot.production()before anything is signed. It does not degrade — it aborts, which is why the release ended up with no artifacts attached.Observed on the v0.4.3 repair dispatch (run 33049593932), which fetched the published artifacts from PyPI successfully and then died on signing.
v3.1.0 moved the action to sigstore-python 4.x for Rekor v2; v3.5.0 is current.
rekor-versionstill defaults to 1 in the action's 3.x series, so bundle format is unchanged and thedist/*.sigstore.jsonupload glob is unaffected. Still pinned by SHA, with a note at both call sites recording why pinning back below v3.1.0 breaks signing.After this merges
Re-dispatch
release.ymlwithrelease_tag: v0.4.3to attach and sign the bytes PyPI already holds. That path emits no SBOM by design, so v0.4.3 keeps signed artifacts without one; 0.4.4 onward gets both.