uv-audit-cooldown
Cooldown-aware uv audit: it warns while a fix is inside your exclude-newer window, and fails once it isn't.
Unofficial, and not affiliated with Astral. It relies on uv audit's preview JSON output.
# GitHub Action
- uses: jgstew/uv-audit-cooldown@<full-commit-sha> # v1.0.0
# pre-commit
repos:
- repo: https://github.com/jgstew/uv-audit-cooldown
rev: v1.0.0
hooks:
- id: uv-audit-cooldown
verbose: true # pre-commit hides output of passing hooks
stages: [manual] # needs the network
uvx uv-audit-cooldown@1.0.0
What it does
It runs uv audit. For each vulnerable package it then runs
uv lock --dry-run --upgrade-package <name>, which shows the newest version
your own cooldown allows and leaves uv.lock untouched. If no audit
finding is reported, no other network call is made.
| Situation | Result |
|---|---|
| Every fix is still inside the cooldown | pass, with a one-line summary |
| An upgrade is allowed, but it doesn't reach the fix yet | pass, and the summary says so |
| A fixed version is allowed now | fail |
| A fix is blocked by something other than the cooldown (a pin) | fail |
| No fix has been published | fail (--unfixed warning to soften) |
No project or no uv.lock (as uv finds them) |
pass with a warning (--no-lockfile error to fail) |
To tell whether a fix is held back only by the cooldown, it runs a second
dry run with the cooldown lifted. That one uses --no-build, so it never
runs build code from a release that is still inside the cooldown; if it would
need a build, the tool exits 2.
In GitHub Actions, messages are printed as ::warning/::error annotations.
--verbose prints one line per advisory. Other arguments go to uv audit,
e.g. --no-dev or --ignore GHSA-…. Location, config, index, cache, build
and resolver options (--project, --index, --prerelease, --exclude-newer, …)
also go to the dry runs, so both see the same settings; UV_* environment
variables reach both too. --offline isn't used: on a cold
CI cache it fails, and with a stale cache it could hide a fix that is already allowed.
Exit codes: 0 nothing to do now, 1 action needed, 2 uv failed or its
output wasn't understood.
Action inputs
working-directory (default .), args (extra uv audit arguments),
unfixed (error/warning), no-lockfile (warning/error),
setup-uv (auto/true/false), uv-version.
Pinning
- Action: pin
uses:to a commit SHA. The Action runs its own checkout (uv run --frozen --project "$GITHUB_ACTION_PATH") and never installs from PyPI. - pre-commit: pin
rev:to a tag, or to a SHA withpre-commit autoupdate --freeze. - uvx: pin a version:
uvx uv-audit-cooldown@1.0.0.
pre-commit limitation
pre-commit installs the hook with pip (language: python), which ignores this
repo's uv.lock and exclude-newer. The hook's dependency (packaging) and
its build backend (uv_build) therefore come from PyPI at their newest allowed
versions, with no cooldown. rev: pins only this repo's code. If that matters,
use the Action (it runs uv run --frozen from its own lockfile), or a local
hook with language: system and
entry: uvx --exclude-newer "7 days" uv-audit-cooldown@1.0.0.
Related uv issues
astral-sh/uv#18995, astral-sh/uv#22944, astral-sh/uv#19265, astral-sh/uv#18506
Metadata
Release files for uv-audit-cooldown 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 | Actions |
|---|---|---|---|---|
| uv_audit_cooldown-1.0.0.tar.gz | 11.3 kB | Without provenance | Details for uv_audit_cooldown-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uv_audit_cooldown-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for uv_audit_cooldown-1.0.0-py3-none-any.whl |
Total release size: 24.0 kB
Release files / uv_audit_cooldown-1.0.0.tar.gz
| Download URL | uv_audit_cooldown-1.0.0.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8a15d42d7ddce4b51325f90ae4b29679a3e637f9dad9817d99bfd1d32f05c3ca
|
|
BLAKE2b-256 checksum How to use checksums |
ebd64a4fdb199fa932accb0517c045afd273e350c74e66dfb268e48e6516769f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / uv_audit_cooldown-1.0.0-py3-none-any.whl
| Download URL | uv_audit_cooldown-1.0.0-py3-none-any.whl |
|---|---|
| Size | 12.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fde141b64600d3034a337c7cb520dc14f3b7878ee7c083d6ac3225a07f80e044
|
|
BLAKE2b-256 checksum How to use checksums |
d76643abe2e24746eb2bd5baf6ce8d543258611b15d7814e1282acd2a31d2a60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for uv-audit-cooldown 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.