Skip to content

fix: require hashes for cryptography package in release signing#89

Open
Jaro-c wants to merge 1 commit into
developfrom
fix/release-pip-require-hashes
Open

fix: require hashes for cryptography package in release signing#89
Jaro-c wants to merge 1 commit into
developfrom
fix/release-pip-require-hashes

Conversation

@Jaro-c

@Jaro-c Jaro-c commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds .github/scripts/sign-requirements.txt pinning cryptography==48.0.0 with --hash=sha256: for all 48 wheels and the sdist (covering all CI platforms: linux x86_64/arm64, macOS universal2, Windows x86_64)
  • The sign binary step now uses pip install --require-hashes -r .github/scripts/sign-requirements.txt — pip aborts if any downloaded artifact's hash doesn't match

Why

Plain pip install cryptography==48.0.0 is 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

  • CI passes on all 5 build runners
  • Manually: pip install --require-hashes -r .github/scripts/sign-requirements.txt succeeds on linux x86_64

Closes #78

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>
@Jaro-c Jaro-c added type:security Security issue or hardening prio:P1 High status:review Waiting for review effort:S A few hours area:release Release workflow and artifacts labels Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:release Release workflow and artifacts effort:S A few hours prio:P1 High status:review Waiting for review type:security Security issue or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant