uv-sbom-bin
Python wrapper for the uv-sbom CLI tool written in Rust.
Generate SBOMs (Software Bill of Materials) for Python projects managed by uv.
Features
- Fast and standalone - Written in Rust, no Python dependencies required at runtime
- Multiple output formats - CycloneDX 1.6 JSON (standard) and Markdown (human-readable)
- Vulnerability scanning - CVE checking via OSV API is enabled by default; use
--no-check-cveto opt out - Configurable thresholds - Filter vulnerabilities by severity or CVSS score
- Package exclusion - Exclude internal packages with
--excludepatterns - Configuration file support - Define defaults in
uv-sbom.config.yml - License compliance - Enforce license policies with allow/deny lists via
--check-license - CI/CD ready - Exit codes for easy integration into pipelines
- License detection - Automatically fetches license info from PyPI
Why uv-sbom?
Unlike other SBOM tools that scan the entire virtual environment, uv-sbom focuses on production runtime dependencies from uv.lock:
| Aspect | uv-sbom | CycloneDX Official Tools |
|---|---|---|
| Data Source | uv.lock file |
.venv virtual environment |
| Scope | Production dependencies only | Entire supply chain |
| Package Count | Fewer (e.g., 16 packages) | More (e.g., 38+ packages) |
| Use Case | Production security scanning | Comprehensive audit |
This focused approach reduces noise in security scanning by excluding build-time dependencies that don't ship with your application.
Installation
Via uv (Recommended)
uv tool install uv-sbom-bin
Via pip
pip install uv-sbom-bin
After installation, the uv-sbom command will be available in your PATH.
Note: The package name is
uv-sbom-bin, but the installed command isuv-sbom.
Usage
Basic Commands
# Show version
uv-sbom --version
# Generate CycloneDX JSON SBOM (default)
uv-sbom --format json
# Generate Markdown SBOM
uv-sbom --format markdown --output SBOM.md
Vulnerability Checking
CVE checking is enabled by default. Use --no-check-cve to opt out.
# Check for all vulnerabilities (default — no flag needed)
uv-sbom --format markdown
# Check for High/Critical severity only
uv-sbom --format markdown --severity-threshold high
# Check for CVSS >= 7.0
uv-sbom --format markdown --cvss-threshold 7.0
# Ignore specific CVEs
uv-sbom --format markdown --ignore-cve CVE-2024-1234
# Disable CVE checking
uv-sbom --format markdown --no-check-cve
License Compliance Check
# License compliance check
uv-sbom --check-license --license-allow "MIT,Apache-2.0,BSD-*"
# Combined with vulnerability check (CVE enabled by default)
uv-sbom --check-license --severity-threshold high
Excluding Packages
# Exclude specific packages
uv-sbom -e "pytest" -e "mypy"
# Exclude with wildcards
uv-sbom -e "*-dev" -e "debug-*"
Configuration File
Create a uv-sbom.config.yml file in your project directory:
format: markdown
# check_cve: true # CVE checking is enabled by default; set to false to disable
severity_threshold: high
exclude_packages:
- "pytest"
- "*-dev"
ignore_cves:
- id: CVE-2024-1234
reason: "False positive for our use case"
license_policy:
allow: ["MIT", "Apache-2.0", "BSD-*"]
deny: ["GPL-3.0-only", "AGPL-*"]
unknown: "warn"
Generate a template:
uv-sbom --init
CI Integration
# GitHub Actions example (CVE checking is enabled by default)
- name: Security Check
run: uv-sbom --format markdown --severity-threshold high
Output Example
Markdown format with vulnerability report:
# Software Bill of Materials (SBOM)
## Component Inventory
| Package | Version | License | Description |
|---------|---------|---------|-------------|
| requests | 2.31.0 | Apache 2.0 | HTTP library for Python |
| pydantic | 2.12.5 | MIT | Data validation using Python type hints |
## Vulnerability Report
| Package | Current | Fixed | CVSS | Severity | CVE ID |
|---------|---------|-------|------|----------|--------|
| urllib3 | 2.0.0 | 2.0.7 | 9.8 | CRITICAL | CVE-2023-45803 |
How It Works
This package downloads the prebuilt Rust binary for your platform from the GitHub releases and installs it.
Supported platforms:
- macOS (Apple Silicon and Intel)
- Linux (x86_64)
- Windows (x86_64)
Full Documentation
For comprehensive documentation including:
- Complete command-line reference
- Security input validation details
- Network requirements and proxy configuration
- Exit codes and error handling
- Troubleshooting guide
Visit the main repository: uv-sbom on GitHub
License
MIT License - see LICENSE
Metadata
Release files for uv-sbom-bin 2.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| uv_sbom_bin-2.8.0.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| uv_sbom_bin-2.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.1 kB
Release files / uv_sbom_bin-2.8.0.tar.gz
| Download URL | uv_sbom_bin-2.8.0.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ced5187955bd7283e42ca95f9d6e9bb1595cedf34cdfdff5d1531c412fbfe50a
|
|
BLAKE2b-256 checksum How to use checksums |
aceeb388a3ab16df7e79025d4ad0013d7a43240649649666ad0ef005066ee4e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.
Transparency logRelease files / uv_sbom_bin-2.8.0-py3-none-any.whl
| Download URL | uv_sbom_bin-2.8.0-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3f0d4d917eff0e6ba93266212617e2595385bc76996c8b529df18bd16ad11947
|
|
BLAKE2b-256 checksum How to use checksums |
7871a13ab3c6479c63d5053c21a341d255cb5878a00e6a4c5326161e8ba6a650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.
Transparency log