Repository navigation
fix(deps): install pre-commit only on Python 3.11+ to drop vulnerable filelock - #89
Merged
Merged
Conversation
On Python 3.10 the lock resolved pre-commit 4.6.2, whose virtualenv and python-discovery dependencies pulled filelock 4.1.0. Every patched filelock release (4.2.1+) requires Python 3.11, so the 3.10 fork could never move off the vulnerable version. pre-commit is a local-only tool here (the pre-commit workflow installs it itself on Python 3.x), so gate it to python_version >= '3.11'. The 3.10 resolution no longer contains filelock at all, and the 3.11+ fork keeps filelock 4.2.4. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ClayMav
approved these changes
Oct 29, 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.
Clears the 17 open
filelockDependabot alerts (50–66: 1 high, 12 medium, 4 low; allfilelock <= 4.2.0inuv.lock).Root cause
uv.lockforks on Python version. Underpython_full_version < '3.11'it resolvedfilelock 4.1.0; 3.11+ already had4.2.4. Every patched filelock release (4.2.1+) requires Python >= 3.11, so the 3.10 fork could never be upgraded. The only path to filelock on 3.10 was dev-only:(This chain appeared with the virtualenv 20 -> 21 bump in #88.)
Fix
Gate the dev dependency to
pre-commit; python_version >= '3.11'and relock. No runtime dependency changes. CI is unaffected: the test workflow installs viapip install ".[test]", and the pre-commit workflow does its ownpip install pre-commiton Python3.x.Side effect: developers on Python 3.10 no longer get
pre-commitfromuv sync; use 3.11+ (or install it separately) to run the hooks.Verification
Every
[[package]]entry for the alerted package, all resolution forks:<= 4.2.0(narrowest lower bound varies)4.1.0[py<3.11] vulnerable;4.2.4[py>=3.11] ok4.2.4only (reachable on py>=3.11 via pre-commit) okAlso dropped from the 3.10 fork:
pre-commit 4.6.2,platformdirs 4.12.4.pip-audit(PyPI source) on the exported lock, evaluated per Python 3.10 / 3.11 / 3.12 / 3.13 / 3.14 x linux / darwin / win32: before = 17 filelock vulns on 3.10 only; after = no known vulnerabilities in any combination./advisories?ecosystem=pip&affects=<pkg>@<ver>): 0 hits.pytest tests/: 315 passed on 3.10, 3.11 and 3.14. On 3.10 neitherfilelocknorpre_commitis installed.pre-commit run --all-filespasses on 3.11.🤖 Generated with Claude Code