Replace pip-audit with uv audit for vulnerability scanning - #7
Draft
GuidoHeijden with Copilot wants to merge 3 commits into
Draft
Replace pip-audit with uv audit for vulnerability scanning#7GuidoHeijden with Copilot wants to merge 3 commits into
GuidoHeijden with Copilot wants to merge 3 commits into
Conversation
- Rewrite check_uv_lock_vulnerabilities.py to use `uv audit --frozen` - Remove pip-audit dependency from pyproject.toml - Add `[tool.uv] exclude-newer = "P7D"` for supply chain attack prevention - Update README.md with uv audit documentation and cooldown explanation - Regenerate uv.lock without pip-audit dependencies Agent-Logs-Url: https://github.com/DatacationOrg/pre-commit-hooks/sessions/7a17e0b9-8ab5-4088-8c0b-039df530392d Co-authored-by: GuidoHeijden <41060932+GuidoHeijden@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
GuidoHeijden
May 20, 2026 11:57
View session
added 2 commits
May 20, 2026 16:27
|
I have made changes such that this PR is good to go. However, |
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
Migrates from
pip-audittouv auditfor dependency vulnerability scanning, asuv auditis no longer a preview feature and provides a simpler, more integrated solution for projects managed byuv.Changes
hooks/check_uv_lock_vulnerabilities.pypip-auditapproach (export to requirements.txt → run pip-audit) with a directuv audit --frozensubprocess call[tool.pip-audit]to[tool.uv-audit]section inpyproject.tomlos,tempfile,pip_audit)pyproject.tomlpip-auditfrom dependencies (now emptydependencies = [])[tool.uv] exclude-newer = "P7D"to enforce a 7-day dependency cooldown for supply chain attack preventionREADME.mduv auditinstead ofpip-auditexclude-newer)uv.lockpip-auditand its transitive dependenciesDependency Cooldown
The
exclude-newer = "P7D"setting ensures that only packages published more than 7 days ago are considered during dependency resolution. This prevents supply chain attacks where malicious packages are quickly published and consumed. The--frozenflag inuv auditensures the audit runs against the existing lockfile without re-resolving, so developers are not blocked by vulnerability fixes still within the cooldown period.