ci: audit runtime deps only in publish workflow#24
Merged
Conversation
The 1.6.0 publish run failed at the pip-audit step on two CVEs in `pip`
itself, even though `pip` is not a runtime dependency of the published
`hyperping` wheel. The root cause was that pip-audit was scanning the
entire venv (which uv populates with build/dev tooling including pip)
instead of the dependency closure that users actually install.
Switch the publish-time audit to operate on a freshly exported
runtime-only requirements file (`uv export --no-dev --no-emit-project`).
This audits exactly what `pip install hyperping` would resolve to, and
silences env-only noise without ignoring real CVE IDs.
Local check:
$ uv export --no-dev --no-emit-project --no-hashes \
--format requirements.txt -o /tmp/req.txt
$ uv run pip-audit -r /tmp/req.txt
No known vulnerabilities found
ci.yml's audit step is `continue-on-error: true` and is unaffected; can
be tightened the same way in a follow-up.
7f45056 to
cb8a8a0
Compare
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
The 1.6.0 publish run failed at the pip-audit step on two CVEs in
pipitself, even thoughpipis not a runtime dependency of the publishedhyperpingwheel.The root cause: pip-audit was scanning the whole venv (which
uv syncpopulates with build/dev tooling, includingpip) instead of the runtime closure users actually install. So a CVE in CI tooling blocked a release on a package that doesn't ship that tool.This PR switches the publish-time audit to operate on a freshly exported runtime-only requirements file:
That audits exactly what
pip install hyperpingresolves to. No CVE IDs are ignored: when the audit is green it's because the runtime closure is genuinely clean.Local verification
Out of scope
ci.yml's audit step iscontinue-on-error: trueand is unaffected. Tightening it the same way is a sensible follow-up.Release follow-up
After merge, delete and recreate the
v1.6.0tag pointing at the merge commit so the publish workflow runs against the fixed file. No PyPI artifact was published in the failed run, so retagging is safe.Test plan
v1.6.0triggers a green publish-to-PyPI run