Skip to content

ci: audit runtime deps only in publish workflow#24

Merged
KhaledSalhab-Develeap merged 1 commit into
mainfrom
fix/publish-pip-audit-cves
May 6, 2026
Merged

ci: audit runtime deps only in publish workflow#24
KhaledSalhab-Develeap merged 1 commit into
mainfrom
fix/publish-pip-audit-cves

Conversation

@KhaledSalhab-Develeap
Copy link
Copy Markdown
Collaborator

@KhaledSalhab-Develeap KhaledSalhab-Develeap commented May 6, 2026

Summary

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: pip-audit was scanning the whole venv (which uv sync populates with build/dev tooling, including pip) 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:

- name: Audit runtime dependencies
  run: |
    uv export --no-dev --no-emit-project --no-hashes \
      --format requirements.txt -o /tmp/runtime-requirements.txt
    uv run pip-audit -r /tmp/runtime-requirements.txt

That audits exactly what pip install hyperping resolves to. No CVE IDs are ignored: when the audit is green it's because the runtime closure is genuinely clean.

Local verification

$ 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

Out of scope

ci.yml's audit step is continue-on-error: true and is unaffected. Tightening it the same way is a sensible follow-up.

Release follow-up

After merge, delete and recreate the v1.6.0 tag 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

  • Local audit on exported runtime deps reports zero vulnerabilities
  • Re-tagged v1.6.0 triggers a green publish-to-PyPI run

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.
@KhaledSalhab-Develeap KhaledSalhab-Develeap force-pushed the fix/publish-pip-audit-cves branch from 7f45056 to cb8a8a0 Compare May 6, 2026 17:48
@KhaledSalhab-Develeap KhaledSalhab-Develeap changed the title ci: ignore two pip CVEs in publish audit ci: audit runtime deps only in publish workflow May 6, 2026
@KhaledSalhab-Develeap KhaledSalhab-Develeap merged commit 9d69303 into main May 6, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant