Skip to main content

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
on:
  pull_request:
  schedule:
    - cron: "0 6 * * 1" # advisories appear without code changes
permissions:
  contents: read
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
        with:
          persist-credentials: false
      - uses: jgstew/uv-audit-cooldown@0b808b7239fced579e4bb19f3d3ab3a918472abe # 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 with pre-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.

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uv-audit-cooldown 1.0.2
File Size Uploaded Provenance Actions
uv_audit_cooldown-1.0.2.tar.gz 11.5 kB With provenance Details for uv_audit_cooldown-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for uv-audit-cooldown 1.0.2
File Interpreter ABI Platform Actions
uv_audit_cooldown-1.0.2-py3-none-any.whl Python 3 none any Details for uv_audit_cooldown-1.0.2-py3-none-any.whl

Total release size: 24.4 kB

Release files / uv_audit_cooldown-1.0.2.tar.gz

Download URL uv_audit_cooldown-1.0.2.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
27d4420189b001a6f40e94e68b9be31e902f382a85f69688f194b4ad4680b64d
BLAKE2b-256 checksum
How to use checksums
97f5a69a91a5795651bec67af11145945230d41ec6998403f6ab6531edcb0418
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Release files / uv_audit_cooldown-1.0.2-py3-none-any.whl

Download URL uv_audit_cooldown-1.0.2-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a90f0d2314eea94fc2531c00ccce1168447d0047ef90fa51c5ebba63fffad6fd
BLAKE2b-256 checksum
How to use checksums
fa5b75198955f92e17ac9172ebfac7712806ea54b7f7481709dde66e00dfc5a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 28, 2026.

Transparency log

Security for uv-audit-cooldown 1.0.2

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for uv_audit_cooldown-1.0.2.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 28, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page