{
  "id": 14173848,
  "title": "Dependency Cooldowns: Make Your Package Manager Wait Before It Trusts New Code",
  "url": "https://urgent.news/2026/10/13/dependency-cooldowns-make-your-package-manager-wait-before-it-trusts",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-13T10:11:07.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/grimicorn/dependency-cooldowns-make-your-package-manager-wait-before-it-trusts-new-code-1hg9"
  },
  "original_language": "en",
  "account": "npm supply-chain attacks often rely on stealing a publish token or phishing a maintainer to push a malicious patch release, which can then go undetected as many package managers install new versions quickly. Dependency cooldowns aim to address this by forcing package managers to wait before accepting new code. Different tools handle this concept differently, with config keys and units of time varying. pnpm uses minutes, npm uses days by default but can be set in seconds, Bun uses seconds, and Yarn Berry uses minutes. The key setting is simple, but the nuances can lead to surprises, particularly with transitive dependencies and strict vs. fallback modes. When a cooldown is active, old versions must exist for a certain period before being accepted, helping to prevent rapid installation of compromised versions. However, there are edge cases to consider, like how the gate applies to the entire dependency tree, how lockfiles behave, and how missing timestamps can pass by default. Teams must also be cautious of false positives, such as npm lying about the cooldown in certain situations. The main takeaway is that setting up a cooldown is a straightforward line of code, but understanding the specifics of each package manager and managing edge cases is crucial for effective security.",
  "summary": "Most npm supply-chain attacks follow the same script. Someone phishes a maintainer or steals a publish token, pushes a poisoned patch release, and then waits for every ^1.2.3 range on the planet to pick it up on the next install. The malicious version usually gets spotted and pulled within hours. The damage is done in those hours, by machines that installed it before anyone noticed. A dependency…",
  "key_points": [
    "Dependency cooldowns prevent rapid installation of compromised versions",
    "Different package managers handle cooldowns with varying config keys and time units",
    "Teams must manage edge cases like transitive dependencies and false positives"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}