Skip to content

ci: audit only the runtime dependencies with pip-audit - #181

Merged
thorsten-klein merged 1 commit into
mainfrom
fix-filelock-cves
Oct 25, 2026
Merged

thorsten-klein merged 1 commit into
mainfrom
fix-filelock-cves

Conversation

@thorsten-klein

Copy link
Copy Markdown
Owner

Fixes the failing Run Tests workflow (e.g. https://github.com/thorsten-klein/git-nested/actions/runs/40121601902), which also blocks #179 and #180.

Problem

poe pip-audit audited the whole dev environment. filelock 3.32.3 has CVEs (CVE-2026-112907, -112913, -112940) and the fix is in 4.2.1, which needs Python >= 3.11. On 3.10 the newest version is 4.1.0, which has three more CVEs. filelock is dev-only. It comes in through pre-commit → virtualenv and through pip-audit → cachecontrol[filecache], and it never ships with git-nested.

Change

The pip-audit task now audits a uv export --no-default-groups of the lock, so only the runtime dependencies that ship (currently PyYAML) are checked. The export keeps environment markers, so each Python version in CI audits its own resolved set.

Testing

  • poe all passes locally on 3.12.
  • poe pip-audit passes on 3.10 and 3.12.
  • Without this change, the same export-based audit run on 3.10 over the full lock still reports the filelock CVEs.

🤖 Generated with Claude Code

pip-audit ran against the whole dev environment, so a CVE in a dev-only
tool failed every build. filelock (pulled in by pre-commit via virtualenv,
and by pip-audit itself via cachecontrol) has CVEs whose fix needs Python
>= 3.11, so the 3.10 jobs could never pass.

Audit an export of the locked runtime dependencies instead: that is what
ships with git-nested.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (221cc89) to head (fb570c8).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##              main      #181   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           45        45           
  Lines         2122      2122           
=========================================
  Hits          2122      2122           

thorsten-klein added a commit to thorsten-klein/venv-patcher that referenced this pull request Oct 25, 2026
Fixes the failing `Run Tests` workflow on `main`
(https://github.com/thorsten-klein/venv-patcher/actions/runs/40121226763).

The `pip-audit` task audited the whole dev environment, so a CVE in a
dev-only tool failed the build. `filelock` (pulled in by `pre-commit` →
`virtualenv`, and by `pip-audit` → `cachecontrol[filecache]`) has CVEs
(CVE-2026-112907, -112913, -112940) and the fix is in 4.2.1, which needs
Python >= 3.11. filelock never ships with the package.

## Change
`poe pip-audit` now audits a `uv export --no-default-groups` of the
lock, so only the runtime dependencies that ship (currently PyYAML) are
checked. The export keeps environment markers, so the audit covers the
Python it runs on.

Same change as thorsten-klein/git-nested#181.

## Testing
- `poe all` passes locally (149 passed, 1 skipped).
- The old task still reports the 3 filelock CVEs on the current lock.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@thorsten-klein
thorsten-klein merged commit e107dd2 into main Oct 25, 2026
24 checks passed
@thorsten-klein
thorsten-klein deleted the fix-filelock-cves branch October 25, 2026 19:21
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