Python wrapper for uv-sbom - SBOM generation tool for uv projects
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uv_sbom_bin-2.2.0.tar.gz.
File metadata
- Download URL: uv_sbom_bin-2.2.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
006b89c3619c8d9486f58d1396a65a24d1ed5021b8f86a61849e41ca915a6a95
|
|
| MD5 |
67c5ea2f437f00bf8bfc5bad1ac30b25
|
|
| BLAKE2b-256 |
e83da938e0e53e8895549d55f942bccdac8ab6e7d181187d23304891a79987cb
|
Provenance
The following attestation bundles were made for uv_sbom_bin-2.2.0.tar.gz:
Publisher:
release.yml on Taketo-Yoda/uv-sbom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uv_sbom_bin-2.2.0.tar.gz -
Subject digest:
006b89c3619c8d9486f58d1396a65a24d1ed5021b8f86a61849e41ca915a6a95 - Sigstore transparency entry: 1334451876
- Sigstore integration time:
-
Permalink:
Taketo-Yoda/uv-sbom@97dc5d89cad4e2b08fa5fd2b29464f3590ee4852 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/Taketo-Yoda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@97dc5d89cad4e2b08fa5fd2b29464f3590ee4852 -
Trigger Event:
push
-
Statement type:
File details
Details for the file uv_sbom_bin-2.2.0-py3-none-any.whl.
File metadata
- Download URL: uv_sbom_bin-2.2.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d45bc96eb57297e357ba372f6d11429fab90af4e02a612054ce6b143b955db7
|
|
| MD5 |
8f77447ef484ac0b1bbf5c5eb886f184
|
|
| BLAKE2b-256 |
962dc9bfacecc50384ccfa24c25fca1d80fd8ea6924dc15ad60b146062d87813
|
Provenance
The following attestation bundles were made for uv_sbom_bin-2.2.0-py3-none-any.whl:
Publisher:
release.yml on Taketo-Yoda/uv-sbom
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
uv_sbom_bin-2.2.0-py3-none-any.whl -
Subject digest:
9d45bc96eb57297e357ba372f6d11429fab90af4e02a612054ce6b143b955db7 - Sigstore transparency entry: 1334451979
- Sigstore integration time:
-
Permalink:
Taketo-Yoda/uv-sbom@97dc5d89cad4e2b08fa5fd2b29464f3590ee4852 -
Branch / Tag:
refs/tags/v2.2.0 - Owner: https://github.com/Taketo-Yoda
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@97dc5d89cad4e2b08fa5fd2b29464f3590ee4852 -
Trigger Event:
push
-
Statement type: