[PREVIEW] ci: add pip-audit known-CVE scan job (Task A.3)#6
Closed
BW-Projects wants to merge 2 commits into
Closed
[PREVIEW] ci: add pip-audit known-CVE scan job (Task A.3)#6BW-Projects wants to merge 2 commits into
BW-Projects wants to merge 2 commits into
Conversation
Adds `pip-audit>=2.10.0` to the dev dependency group for the known-CVE scan CI job.
05b4346 to
d88bdfd
Compare
Adds a `pip-audit` job that scans the locked dependency graph against the PyPI advisory database. Approach: export the lock as a PEP 751 `pylock.toml` (`uv export --format pylock.toml`) and audit it with `pip-audit <dir> --locked`. pip-audit checks each pinned package against the advisory DB and self-documents anything it can't audit — the git `aTrain_core` dependency and the `+cuXXX` torch builds from the PyTorch index — in a "Skip Reason" table. No app runtime is built (consistent with the ruff/bandit jobs) and no manual requirements filtering is needed; the skips are explicit and auditable. `continue-on-error: true` initially: nicegui 2.21.1 and werkzeug 3.0.3 carry known CVEs pending the coordinated upgrade in JuergenFleiss#159. Findings print on every run; flip the step to gating once JuergenFleiss#159 lands.
d88bdfd to
366a780
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.
Follow-up to the ruff (JuergenFleiss#160) and bandit (JuergenFleiss#167) CI PRs. Adds
pip-auditas its own independent CI job — separate, individual job, doesn't depend
on the bandit PR.
Contributes to JuergenFleiss#158 (Task A — CI lint/format/security).
What this PR does
pip-audit>=2.10.0to[dependency-groups] dev.pip-auditCI job that scans the locked dependency graphagainst the PyPI advisory DB.
Design decision: light (export) vs faithful (installed env)
Two ways to run pip-audit in CI:
drop the entries PyPI can't audit anyway (the git
aTrain_coredepand the
+cuXXXtorch builds from the PyTorch index), thenpip-audit -r … --no-deps. No app runtime built, so the job staysfast and consistent with ruff/bandit (no GTK/torch/pycairo build on
the runner). Still audits everything advisory-tracked: nicegui,
werkzeug, starlette, idna, …
uv sync --locked(needs system libs forpywebview[GTK]→ pycairo) and audit the installed environment.Audits exactly what ships, no filtering, but is heavier (multi-minute
torch build) and needs an
aptstep.Went with (1) since the skipped entries aren't on PyPI and so have no
advisory coverage there regardless. Happy to switch to (2) if you prefer
auditing the installed tree — flagging it for your call.
continue-on-error initially
nicegui 2.21.1andwerkzeug 3.0.3carry known CVEs pending thecoordinated upgrade in JuergenFleiss#159, so the step runs
continue-on-error: truefor now — findings print on every run (visible), but don't block.
Flip to gating once JuergenFleiss#159 lands.
Maps to BSI IT-Grundschutz
known-vulnerable versions) — pip-audit operationalises the
known-CVE half on every run.