pydepaudit
Audit Python dependencies for known vulnerabilities, license-policy signals, release staleness, yanked releases and repository health in one command.
pydepaudit complements vulnerability scanners with metadata-driven license and
maintenance signals. It does not determine whether a package is legally
compliant or safe to use.
$ pydepaudit check
Package Declared Status Details
requests 2.31.0 ✅ no CVEs · Apache-2.0 · 8d ago · 157 contributors
urllib3 1.26.5 ⚠️ GHSA-34jh-... (CVE-2023-43804) | stale 14mo
some-lib 0.4.1 🔴 copyleft license: GPL-3.0 | single contributor, inactive 24mo
3 findings: 1 high, 2 medium
Install
pip install pydepaudit
# or
pipx install pydepaudit
Requires Python 3.11+.
Usage
pydepaudit check # audit pyproject.toml / requirements.txt / uv.lock
pydepaudit check --format json # machine-readable output for CI
pydepaudit check --format sarif # SARIF for GitHub code scanning
pydepaudit check --fail-on high # exit 1 on findings >= severity
pydepaudit check --license MIT # declare your project license for compat checks
pydepaudit check --no-cache # bypass the local HTTP cache
pydepaudit check --installed # audit the live environment instead
pydepaudit show requests # details for one dependency
--fail-on accepts low, medium, high or critical. Ignored dependencies
do not count toward the threshold.
Dependency files are discovered in this order — the first one found wins:
uv.lock(exact pinned versions)poetry.lockrequirements.txtpyproject.toml(PEP 621 dependencies, optional-dependencies and PEP 735 dependency-groups)
Reports
JSON output has a top-level dependencies array. Each entry includes the
declared dependency, status, PyPI metadata, optional repo_health, vulnerability
records (including fixed when OSV provides a fixing version), and findings.
SARIF output follows version 2.1.0 and can be uploaded to GitHub code scanning.
What it checks
| Dimension | Source | Severity logic |
|---|---|---|
| Vulnerabilities | OSV API (querybatch) |
OSV severity or supported CVSS score |
| License policy | PyPI metadata | denied alternatives only → high; weak-copyleft without a permissive option → medium; unknown metadata → low |
| Release age | PyPI release metadata | at least 18 months → medium; at least 12 months → low |
| Yanked pin | PyPI release metadata | exact pin to a fully yanked release → medium |
| Repository | GitHub and OpenSSF Scorecard | archived → high; one inactive contributor → medium; inactivity or low Scorecard → low |
All data sources are public. GitHub works unauthenticated (60 requests/hour);
set GITHUB_TOKEN for a higher rate limit. The token is sent only to
api.github.com.
License checks are heuristic: they compare PyPI license metadata with configured
substring patterns and recognize simple OR alternatives. They are not a full
SPDX evaluator or legal advice. Review the actual license terms before making a
compliance decision.
CI
One line in your pipeline:
- run: pydepaudit check --fail-on high
Or use the GitHub Action:
- uses: MathiasPaulenko/pydepaudit@v1.0.0
with:
fail-on: high
Or upload findings to GitHub code scanning:
- run: pydepaudit check --format sarif > results.sarif
- uses: github/codeql-action/upload-sarif@v4
with: {sarif_file: results.sarif}
Without --fail-on, findings alone do not change the exit code. Exit codes:
0 unless a finding reaches the selected --fail-on threshold;
1 when that threshold is reached, no dependency files are found, or the audit
fails; 2 for invalid arguments or configuration.
Configuration
The project license is autodetected from pyproject.toml or LICENSE; declare it
explicitly with --license or project_license when detection misses.
Optional .pydepaudit.toml in the project root:
stale_months = 12 # low finding past this age
stale_medium_months = 18 # medium finding past this age
inactive_months = 12 # repo inactivity threshold
scorecard_min = 5.0 # low finding below this Scorecard score (0–10)
project_license = "MIT" # copyleft deps are allowed if this is copyleft
denied_licenses = ["GPL", "AGPL", "SSPL"]
[ignore]
legacy-lib = "vendored fork, upstream abandoned on purpose"
Month thresholds must be non-negative integers, and
stale_medium_months must be greater than or equal to stale_months.
scorecard_min must be between 0 and 10. [ignore] suppresses all findings for
each listed package; keep a reason so the exception is reviewable.
Cache
HTTP responses are cached for one hour in the per-user cache directory, outside
the audited project. This avoids trusting cache files supplied by a repository.
Use --no-cache to bypass the cache.
Contributing
See CONTRIBUTING.md — dev setup, test workflow and commit conventions. Security issues go to SECURITY.md, never to public issues.
Status
Stable 1.0.0 release. See CHANGELOG.md for release notes.
License
MIT
Metadata
Release files for pydepaudit 1.0.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 | Provenance | |
|---|---|---|---|---|
| pydepaudit-1.0.0.tar.gz | 57.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pydepaudit-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 100.1 kB
Release files / pydepaudit-1.0.0.tar.gz
| Download URL | pydepaudit-1.0.0.tar.gz |
|---|---|
| Size | 57.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4ee7fd607f802046464cb7b2f9f95a4138c0fa613ef7f7212da9cbe82768fc0
|
|
BLAKE2b-256 checksum How to use checksums |
4322c55c18a9b911b592bfab314407e7f382a0b40aab94ce479107d102b3f70b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 15, 2026.
Transparency logRelease files / pydepaudit-1.0.0-py3-none-any.whl
| Download URL | pydepaudit-1.0.0-py3-none-any.whl |
|---|---|
| Size | 42.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6061a769901f7cffb55cd7411af7fb18bbd4cef5c69be9ab26e1a0528bdcf95b
|
|
BLAKE2b-256 checksum How to use checksums |
6b205d3ace617d1ad2943d6bab51f755f925d3308ef424c76cfc43baf443b65e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.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 Oct 15, 2026.
Transparency logSecurity for pydepaudit 1.0.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pydepaudit-1.0.0.tar.gz
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 Oct 15, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.