fix: require hashes for cryptography package in release signing#89
Open
Jaro-c wants to merge 1 commit into
Open
fix: require hashes for cryptography package in release signing#89Jaro-c wants to merge 1 commit into
Jaro-c wants to merge 1 commit into
Conversation
The sign binary step installed cryptography==48.0.0 without hash verification, allowing a compromised PyPI wheel or MITM to replace the signing package and expose the Ed25519 private key. Add .github/scripts/sign-requirements.txt pinning all 48 wheels and the sdist with --hash=sha256 for every supported platform. The install step now uses --require-hashes so pip aborts if any hash mismatches. Closes #78 Signed-off-by: Jaro-c <75870284+Jaro-c@users.noreply.github.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
.github/scripts/sign-requirements.txtpinningcryptography==48.0.0with--hash=sha256:for all 48 wheels and the sdist (covering all CI platforms: linux x86_64/arm64, macOS universal2, Windows x86_64)pip install --require-hashes -r .github/scripts/sign-requirements.txt— pip aborts if any downloaded artifact's hash doesn't matchWhy
Plain
pip install cryptography==48.0.0is vulnerable to a compromised PyPI wheel or MITM replacing the package, which would expose the Ed25519 private key used to sign all release binaries.Test plan
pip install --require-hashes -r .github/scripts/sign-requirements.txtsucceeds on linux x86_64Closes #78