uv audit tested: fast but narrower gate than pip-audit
Astral's uv package manager gained uv audit and UV_MALWARE_CHECK. Hands-on testing against pip-audit reveals what these experimental security gates actually catch.
On June 8, Astral added two experimental security features to its Python package manager uv: uv audit, a dependency vulnerability scanner, and UV_MALWARE_CHECK, a gate that aborts installation when a known malicious package version is detected. Both rely on matching your lockfile against records in the OSV database rather than performing any real content analysis like antivirus software. To test this hands-on, the author built a throwaway project deliberately packed with outdated, vulnerable dependencies (flask 0.12.2, requests 2.19.1, and others), then ran uv audit against the same lockfile as the established pip-audit tool, finding 48 known vulnerabilities across 13 packages.
uv audit only reports issues, it does not block anything, and it's built for CI integration with text, JSON, and SARIF output formats — the latter feeding directly into GitHub's Security tab. Exit codes make it trivially easy to fail a pipeline: 1 if any vulnerability exists, 0 if clean. The --ignore flag has a notable quirk: suppressing one GHSA advisory also silences its linked CVE and PYSEC aliases automatically. Meanwhile --ignore-until-fixed can quietly become a permanent blind spot if a fix is never released, since there's no built-in expiration.
The more important finding concerns the boundaries of this protection. Both uv audit and UV_MALWARE_CHECK function like a no-fly list check rather than an X-ray scan — they catch known bad name-version combinations but miss any novel counterfeit package or unrecognized threat. That makes these features a useful layer, but not a complete one, and relying on them without understanding their actual mechanics and limits could create false confidence.