PMG dependency cooldown: wait on fresh npm versions
Table of Contents
PMG (Package Manager Guard) wraps npm, pnpm, pip, and other package managers so installs are checked against SafeDep threat intelligence and run in OS sandboxes before arbitrary install scripts touch your machine. For background, see Introducing Package Manager Guard (PMG).
Dependency cooldown is a separate control: it trims registry metadata so version resolution normally ignores releases that are too new. That reduces the window where a compromised or rushed publish is the only version a semver range can pick.
How cooldown works
When cooldown is on, PMG filters npm package metadata and drops versions published inside the configured window (for example, the last 5 days). If the range still matches an older release, the resolver uses it. If nothing outside the window satisfies the range, the install fails until you widen the range, wait, or bypass cooldown (see below).
Cooldown applies to metadata-driven resolution. It does not apply to flows that already use a fixed tarball URL (direct tarball installs, some lockfile or cache cases). See the upstream dependency cooldown notes for details.
Requirement: cooldown needs proxy mode enabled. It is npm-only in the current release.
Install and shell setup
brew install safedep/tap/pmgor:
npm install -g @safedep/pmgWire the shell once (restart the terminal after):
pmg setup installRe-run pmg setup install after upgrades so new options land in your environment.
Enable dependency cooldown
Configuration lives in config.yml (create it via pmg setup install if needed). Example:
dependency_cooldown: enabled: true days: 5Adjust days to your risk tolerance: longer windows mean more installs fall back to older versions; shorter windows allow newer releases sooner.
One-off install without changing the file:
pmg --skip-dependency-cooldown npm install expressDocs and source
- pmg
- npm
- supply-chain
- security
Author
SafeDep Team
safedep.io
Share
The Latest from SafeDep blogs
Follow for the latest updates and insights on open source security & engineering

node-env-resolve: npm Package Installs a Full RAT
node-env-resolve is a malicious npm package that installs a full-featured remote access trojan on developer machines. The RAT streams screens, captures audio, steals browser history, and gives full...

exiouss: Cookie Stealer Bundled in npm Exam Cheat
exiouss on npm is the latest package from the loltestpad campaign — the same attacker who published the ixpresso-core Windows RAT in April. It bundles a dormant ChatGPT cookie stealer alongside an AI...

common-tg-service: 502 npm Versions Hijack Telegram
common-tg-service ships 502 npm versions of a Telegram account-takeover framework with hardcoded 2FA credentials, IMAP-based code harvesting, and forced session eviction. Its companion package...

PyTorch Lightning Compromised: Shai-Hulud Worm Reaches PyPI
PyPI yanked PyTorch Lightning versions 2.6.2 and 2.6.3 after both embedded a two-stage credential-stealing payload. Any import of the library spawns an 11MB obfuscated JavaScript worm identical to...

Ship Code.
Not Malware.
Start free with open source tools on your machine. Scale to a unified platform for your organization.
