fix(ci): use requirements file for pip hash verification in release smoke test and clusterfuzz build.sh script - #38
Merged
Merged
Conversation
…moke test and clusterfuzz `build.sh` script Signed-off-by: Division 7 <divisionseven@users.noreply.github.com>
Signed-off-by: Division 7 <divisionseven@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
pascalthedev
approved these changes
Jul 23, 2026
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
Release pipeline smoke-test job fails because
pip install --hash=sha256:...uses--hashas a CLI flag, but--hashis a per-requirement option valid only inside pip requirements files. pip ≥26.1.2 (ubuntu-24.04) rejects it withno such option: --hash. Fixed by writing the hash-pinned requirement to a temp file viaprintfand installing withpip install -r <file> --require-hashes.Type of Change
Motivation and Context
Bug fix: The release pipeline (
release.yml) failed at the "Install from PyPI (with propagation retry)" smoke-test step. Root cause:--hashwas added for Scorecard Pinned-Dependencies compliance in commita5d2aeebut used as a CLI flag — pip only accepts--hashinside requirements files, verified against pip's own source code (SUPPORTED_OPTIONS_REQvsSUPPORTED_OPTIONSinreq_file.py) and official documentation.Release: Prepare v1.0.7 with the above fix as the release content.
Implementation Notes
--hashoption is architecturally scoped to individual requirement lines in pip — it lives inSUPPORTED_OPTIONS_REQ(per-requirement), notSUPPORTED_OPTIONS(global CLI). Thepip installCLI parser only registers--require-hashesas a CLI flag, not--hash..github/workflows/release.ymland.clusterfuzzlite/build.sh) had the identical bug from the same Scorecard commit — fixed together.4d1ec4a1...9d456was verified against the PyPI JSON API — it's the correct SHA256 for the Linux x86_64 wheel ofuv==0.5.1.no such option: --hash, the requirements-file approach correctly parses and validates hashes.Testing
pytest --cov-fail-under=90)pytest tests/integration/test_smoke_e2e.py --tb=short -q)Manual testing performed:
pip install "uv==0.5.1" --hash=sha256:... --require-hashesno such option: --hashprintf '...' > /tmp/req.txt && pip install -r /tmp/req.txt --require-hashesrelease.yml)build.sh)Checklist
ruff check .andruff format --check .)mypy .)pytest --cov-fail-under=90)CHANGELOG.mdwith a brief entry under[Unreleased]Related Issues / PRs
Fixes the release pipeline smoke-test failure identified in run 30035166772.