Sign and checksum the desktop binaries - #10
Merged
Conversation
Three executables are attached to every release and run directly on someone's machine. Nothing let a downloader tell whether the file they got is the file this workflow produced. The wheel already has that guarantee: gh-action-pypi-publish emits a PEP 740 attestation, and stadion-rl 0.1.0 carries a verified bundle with a Rekor entry. The artefact inside a virtualenv was verifiable and the artefact executed directly was not, which is the wrong way round. SHA256SUMS goes in the format sha256sum -c reads, and the provenance attestation covers all three binaries. id-token and attestations are scoped to the attach job, so the matrix builds that run PyInstaller over third-party dependencies keep read-only credentials.
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.
Three standalone executables are attached to every release, and people download and run them. Nothing currently lets a downloader tell whether the file they received is the file this workflow produced.
The wheel already has this.
pypa/gh-action-pypi-publishemits a PEP 740 attestation on publish — verified on a sibling project:So the artefact installed inside a virtualenv is verifiable, and the artefact executed directly on someone's machine is not. That is the wrong way round.
What this adds
SHA256SUMS, one file in the formatsha256sum -creads directly, attached alongside the binaries.A signed build-provenance attestation over all three executables — which workflow, at which commit, produced those exact bytes. A downloader verifies it without trusting the release page:
Permissions
id-token: writeandattestations: writeare scoped to theattachjob rather than declared at the top of the file, so the three matrix builds keep read-only credentials. The build jobs run PyInstaller over third-party dependencies; they are the last place to widen a token.Verified
YAML parses; job graph is
build, attach; theattachjob resolves tocontents: write, id-token: write, attestations: writewith steps Download all binaries → Checksums → Attest the binaries → Attach to release.Not verifiable before merge: the attestation itself only exists once a release is published. Worth watching the next
gliarelease and running the verify command above on the artefact.