Skip to content
romnnPublic

About

A unified, language-agnostic tool to prevent supply-chain attacks

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

464 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cooldown

Refuse dependency versions younger than a minimum age.

Install · Example · Commands · Configuration · Documentation

build status test status dependency status crates.io


cooldown outdated in a Cargo project: a table of dependencies with their current, adoptable and latest versions, age against window, and a status of adoptable, in cooldown, exempt, up-to-date or pinned
cooldown outdated with a 7-day window: what is old enough to adopt, and what is still too young.

Malicious package versions are usually found and pulled within hours to a few days of their release. cooldown keeps them out of your builds until then: it refuses any version younger than a window, 7 days by default, across every package manager in a repository, from one cooldown.toml.

  • Good for: repositories that want one age gate for all their lockfiles, direct and transitive dependencies included, in CI and when updating.
  • Not for finding known vulnerabilities: cargo audit, govulncheck and OSV-Scanner do that, and cooldown works beside them.
  • Not for opening update pull requests: Renovate and Dependabot do that, and cooldown check gates what they propose.

Install

Pick one:

# With Homebrew
brew install --cask romnn/tap/cooldown

# With mise, from the GitHub release
mise use github:romnn/cooldown

# From source, which compiles it and takes a few minutes
cargo install --locked cooldown

cooldown runs each ecosystem's own package manager, such as cargo, uv or pnpm, to resolve and change locks, so those must be on PATH. It supports:

  • Rust: Cargo
  • Go: Go modules
  • Python: uv, pip (requirements.txt), Poetry, conda and pixi
  • JavaScript and TypeScript: npm, pnpm, Yarn, Bun and Deno
  • Ruby, Elixir, Java and Swift: Bundler, Hex, Maven, Gradle and SwiftPM

Example

Run it from the root of a repository; it finds the package managers there.

  1. See what could update. adoptable rows have cleared their window, in cooldown rows are still too young:

    cooldown outdated
  2. Move every dependency to the newest version that has cleared its window, and re-lock. Add --dry-run to see the plan first:

    cooldown upgrade
  3. Gate CI. check exits with 1 when anything in the lock, transitive dependencies included, is younger than its window:

    cooldown check

When check fails, pick one:

  • Wait until the version is old enough.
  • cooldown baseline accepts it, so check passes on that version.
  • cooldown fix rolls it back to the newest version that has cleared its window.

Getting started walks through a real run.

Commands

Command What it does
outdated Lists what could update, split into adoptable now and still in cooldown
upgrade Moves to the newest version that has cleared its window, then re-locks
fix Rolls dependencies that are too young back to a version that has cleared it
check Fails when anything in the lock is younger than its window: the CI gate
baseline Records the current young versions as accepted, so check passes on them
explain <pkg> Shows why a package has its window, layer by layer (alias why)
config Prints the resolved configuration, with where each value comes from
init Writes a commented starter cooldown.toml, and never overwrites one
schema Prints the JSON schema of --json output
sync Writes the policy into the package managers' own cooldown settings
prune Removes run traces and cache entries older than 30 days (--older-than)
recover Restores Cargo project files an interrupted run left changed

check exits with:

  • 0: nothing in the lock is too young.
  • 1: a dependency is younger than its window.
  • 2: a usage or configuration error.
  • 3: no package manager was found.
  • 4: a stale lock, an unreachable registry or a failed package manager.

The CLI reference lists every flag and exit code.

Configuration

cooldown reads cooldown.toml files from the repository's root down to each project, after a global ~/.config/cooldown/config.toml; a nearer file wins. Without one, the window is 7 days.

# cooldown.toml
# The window for every dependency: "14d", "2 weeks", "36h" or ISO 8601 "P14D".
min-age = "14d"

# Packages that skip the window, such as your own. `cooldown explain` lists every exemption.
allow = ["acme-*"]

# A minimum window that no other setting can lower, except an `allow` in this same file.
floor = "3d"

# A window for one package manager: cargo, go, uv, pip, poetry, conda, pixi, npm, pnpm, yarn,
# bun, deno, bundler, hex, maven, gradle or swift.
[tool.uv]
min-age = "21d"

# Rules for one package, by name or glob; `tool.npm` limits this one to npm projects.
[tool.npm.package.typescript]
# Stays on TypeScript 5, even under `upgrade --major`.
max-major = 5

# A window for one registry: crates.io, npm, jsr, pypi, rubygems, hexpm, maven-central, conda,
# github, or the host of Go's first GOPROXY entry.
[registry."goproxy.acme.io"]
min-age = "0d"

Two more keys replace the rolling window:

  • latest = true: turns the window off.
  • freeze = "2026-06-01": refuses anything published after a fixed date.

Command-line flags and COOLDOWN_* variables override every file. The documentation covers the rest:

  • Precedence: how layers and selectors decide a value, and how allow and floor interact.
  • Selectors: per-tool keys such as Cargo's generated-members and pnpm's single-copy.
  • Exclusions: exclude-folders, exclude-packages and include-hidden.
  • Advisories: the OSV feed, which marks updates that fix a known advisory and can give them a shorter window.

License

MIT

About

A unified, language-agnostic tool to prevent supply-chain attacks

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages