Skip to main content

Vulnerability scanner for uv-managed Python projects (Rust binary shipped via PyPI)

Project description

py-uv-audit

A fast vulnerability scanner for uv-managed Python projects, written in Rust and distributed via PyPI as a precompiled binary.

Reads your pyproject.toml + uv.lock, queries the OSV vulnerability database for every direct and transitive dependency, and prints a colorized report with actionable fix suggestions.

Installation

pip install py-uv-audit
# or, with uv:
uv tool install py-uv-audit
# or, for Rust users:
cargo install py-uv-audit

Pre-built wheels ship for Linux (x86_64, aarch64), macOS (x86_64, Apple Silicon), and Windows (x86_64). No Rust toolchain required on your machine.

Usage

Run from the root of a uv-managed Python project (directory with pyproject.toml and uv.lock):

py-uv-audit                          # scan and report vulnerabilities
py-uv-audit --tree                   # print full dependency tree
py-uv-audit --suggest                # report + remediation suggestions
py-uv-audit --tree --suggest         # all of the above
py-uv-audit --pyproject ./path/to/pyproject.toml --lockfile ./path/to/uv.lock

Example output

=== VULNERABILITY REPORT ===

VULNERABLE: requests v2.31.0
  Introduced via: [direct dependency]
  - GHSA-9wx4-h78v-vm56: requests vulnerable to .netrc credentials leak
    Severity: MODERATE (CVSS_V3)
    Fixed in: 2.32.0
    Advisory: https://github.com/advisories/GHSA-9wx4-h78v-vm56

--- 1 vulnerable package(s) found (42 total scanned) ---

How it works under the hood

py-uv-audit is a Rust binary, but you install it through pip. The trick is what ruff and uv itself do: GitHub Actions compiles the Rust source for every (OS, arch) combination, wraps each binary in a Python wheel, and publishes those wheels to PyPI. When you run pip install py-uv-audit, pip picks the wheel matching your platform, extracts the binary into your venv's bin/, and you can run py-uv-audit from the shell. There is no Python code at runtime — Python is purely the installer.

Development

Requires Rust (≥ 1.85 for edition 2024) and optionally uv + maturin for testing the PyPI build.

# Iterate on the Rust source
cargo run -- --tree --suggest

# Build a release binary
cargo build --release
./target/release/py-uv-audit --tree

# Build a wheel locally (matches what CI produces)
uv tool install "maturin>=1.7,<2.0"
maturin build --release
ls dist/         # py_uv_audit-0.1.0-py3-none-<platform>.whl

# Install the wheel into a throwaway venv to test
uv venv /tmp/v
uv pip install --python /tmp/v dist/py_uv_audit-*.whl
/tmp/v/bin/py-uv-audit --tree

Releasing

Releases are tagged commits on the default branch. GitHub Actions builds wheels for every platform and publishes to PyPI automatically.

# Bump version in Cargo.toml (single source of truth — pyproject.toml reads it dynamically)
git commit -am "bump to 0.2.0"
git tag -a v0.2.0 -m "Release 0.2.0"
git push origin master --tags

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_uv_audit-0.1.0.tar.gz (33.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

py_uv_audit-0.1.0-py3-none-win_amd64.whl (1.9 MB view details)

Uploaded Python 3Windows x86-64

py_uv_audit-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.0 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

py_uv_audit-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.9 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

py_uv_audit-0.1.0-py3-none-macosx_11_0_arm64.whl (1.8 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file py_uv_audit-0.1.0.tar.gz.

File metadata

  • Download URL: py_uv_audit-0.1.0.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_uv_audit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 354e668b2d3524ee4194f59e27b1eba005464504c9cc8b09dd71af034fb8d394
MD5 6bd81899c9a0b5fee5f08e10d21aff24
BLAKE2b-256 a97f2b5601f7197e23d418543038affc7db8f87a49009b442b8f558b1fd73113

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_uv_audit-0.1.0.tar.gz:

Publisher: ci.yml on shivakharbanda/py-uv-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_uv_audit-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: py_uv_audit-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.9 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for py_uv_audit-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b0486985423365784951f8f9c46c1adbd58ecf7dce52e750006c4f0e0d60bbc4
MD5 d78bd96e6ff61527cb3cb79c71412810
BLAKE2b-256 099bd8eb484803ea787d014e6cd0ac1bf7384aa18d42f1b8a6ad776f07e1d669

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_uv_audit-0.1.0-py3-none-win_amd64.whl:

Publisher: ci.yml on shivakharbanda/py-uv-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_uv_audit-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for py_uv_audit-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 756df766aaf904afdd95abc8a4c54d4a88a912f27b7a4bc2807c8d8e003c9359
MD5 b9b887458d343e4a53c0ca364c2499d1
BLAKE2b-256 eec1d82bea94ccd1a1c80821ee2ecd304996652188e78d2a3ef80c44d4c3e430

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_uv_audit-0.1.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: ci.yml on shivakharbanda/py-uv-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_uv_audit-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for py_uv_audit-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1325d96ca78f3dd0a3a0cf3101f4d1aa445c2cfbf269436b7ccec93ad9bbfdc8
MD5 074ee6af0448deedb72b2d4ec36be1ff
BLAKE2b-256 10296758cfb7960a094168ae924952882fa33294df8b22b9e6bd6481e16a5aa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_uv_audit-0.1.0-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: ci.yml on shivakharbanda/py-uv-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_uv_audit-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for py_uv_audit-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 26915dad12c246ec766c44296945c0b9e7a29d9a5d2f137ae7c098e93be98e52
MD5 b77c3249581ee599d959c32682e2b77a
BLAKE2b-256 2deb135b69415f4380ee52459f8d22965015a6d7659aee1e492eb6cb0c80143f

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_uv_audit-0.1.0-py3-none-macosx_11_0_arm64.whl:

Publisher: ci.yml on shivakharbanda/py-uv-audit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page