exiguus.blog

Personal blog

Supply Chain Security: Implementing Cooldown Phases for Dependencies

Created: 2026-05-20

Introduction

Supply chain attacks have emerged as a critical threat in modern software development, exploiting trust in third-party dependencies, CI/CD pipelines, and package managers. These attacks can inject malicious code into widely used libraries, compromising thousands of projects before detection.

One of the most effective defenses is implementing cooldown phases for dependencies-delaying the installation of newly published packages until they have been available for a minimum period. This allows time for security reviews and reduces the risk of immediate compromise.

This article explains:

Understanding Supply Chain Attacks

Mechanisms and Vectors

Supply chain attacks target the trust relationships between software suppliers and consumers. Common attack vectors include:

VectorDescription
Third-Party DependenciesAttackers compromise widely used libraries, injecting malware that inherits trust from the host.
CI/CD PipelinesCompromised build pipelines inject malware during automated builds.
Insider ThreatsMalicious actors with legitimate access introduce vulnerabilities or backdoors.
Man-in-the-MiddleInterception of code or updates during transmission enables tampering.

Real-World Examples

Recent high-profile supply chain attacks include:

1. NotPetya (2017-06)
  • Year: June 27, 2017
  • Impact: $10B+ in global damages. Wiper malware disguised as ransomware, targeting Ukrainian organizations via compromised M.E.Doc accounting software. Spread globally, affecting Maersk ($300M), Merck ($870M), FedEx ($400M), and others.
  • Vector: Supply chain (software update).
  • Sources:
2. SolarWinds (2020-12)
  • Year: 2020 (compromise began as early as September 2019; discovered December 2020)
  • Impact: Backdoor distributed to ~18,000 customers, including U.S. government agencies (Treasury, DHS, DoD, etc.).
  • Vector: Compromised update mechanism (SUNBURST malware).
  • Sources:
3. Kaseya (2021-07)
  • Year: July 2, 2021
  • Impact: Ransomware attack via zero-day in Kaseya VSA (CVE-2021-30116). ~1,500 businesses affected (MSPs and their clients). REvil demanded $70M for a universal decryptor.
  • Vector: Zero-day vulnerability in remote management software.
  • Sources:
4. 3CX (2023-03)
  • Year: March 2023 (initial compromise via X_TRADER; public disclosure on March 29–30, 2023)
  • Impact: First confirmed "double supply chain attack": Initial compromise via Trading Technologies' X_TRADER software, then 3CX's own software was weaponized. 600,000+ customers potentially exposed to malware.
  • Vector: Compromised dependency (X_TRADER → 3CXDesktopApp).
  • Sources:
5. MOVEit (2023-05/06)
  • Year: May–June 2023
  • Impact: Zero-day SQL injection (CVE-2023-34362) exploited by Cl0p ransomware group. 2,500+ organizations and 66M+ individuals affected (as of Oct 2023). High-profile victims: BBC, British Airways, U.S. Dept. of Energy, Nova Scotia (100K employees).
  • Vector: Vulnerable third-party component (MOVEit Transfer).
  • Sources:
6. Axios (2026-03)
  • Year: March 31, 2026
  • Impact: Two malicious versions (1.14.1 and 0.30.4) published to npm, injecting a cross-platform Remote Access Trojan (RAT) via a dependency (plain-crypto-js@4.2.1). 100M+ weekly downloads of Axios; exposure window: ~3 hours.
  • Vector: Compromised npm package (maintainer account takeover).
  • Sources:
7. Bitwarden CLI (2026-04)
  • Year: April 22, 2026
  • Impact: Malicious @bitwarden/cli@2026.4.0 available on npm for ~90 minutes (5:57–7:30 PM ET). Self-propagating worm stole cloud credentials, GitHub tokens, SSH keys, and AI tooling secrets (e.g., Claude, Cursor). Linked to Checkmarx supply chain breach.
  • Vector: Compromised dependency (CI/CD pipeline hijack).
  • Sources:
8. TanStack (2026-05)
  • Year: May 11, 2026
  • Impact: 84 malicious versions across 42 @tanstack/ packages (e.g., @tanstack/router). Part of the "Mini Shai-Hulud" worm campaign. Attack chained GitHub Actions vulnerabilities (cache poisoning, OIDC token theft). 12M+ weekly downloads for @tanstack/react-router.
  • Vector: Compromised npm packages (CI/CD pipeline abuse).
  • Sources:

Cooldown Phases: A Critical Defense Mechanism

How Cooldowns Work

A cooldown phase delays the installation of newly released packages until they have been available for a minimum period (e.g., 7 days). This provides a window for:

Example Workflow:

  1. A package version is published to a registry (e.g., npm, PyPI).
  2. The package manager enforces a minimum release age (e.g., 7 days).
  3. You hope that any malicious package will be detected and removed before it can be installed.

Effectiveness

Implementing Cooldowns Across Package Managers

npm

Configuration:

  min-release-age=7
  ignore-scripts=true
  npm install <package> --min-release-age 0

pnpm

Configuration:

minimum-release-age: 10080 # 7 days
minimum-release-age-exclude:
  - "@trusted/*"
  pnpm add <package> --minimum-release-age 0

Additional Security Features:

Source: pnpm Supply Chain Security

Bun

Configuration:

  [install]
  minimumReleaseAge = 604800  # 7 days
  bun add <package> --minimum-release-age 0

Yarn

Configuration:

npmMinimalAgeGate: 10080 # 7 days
npmPreapprovedPackages:
  - typescript
  - eslint

Python (uv and pip)

uv

  uv pip install --exclude-newer "7 days"
  uv pip install --exclude-newer "0 days"

pip

  pip install --uploaded-prior-to 2026-05-13
  pip install --uploaded-prior-to "7 days"
  pip install --uploaded-prior-to "0 days"

Source: pip Documentation

RubyGems

    source "https://gem.coop"

Broader Strategies for Preventing Supply Chain Attacks

StrategyDescriptionTools/Implementation
Verify Package IntegrityUse checksums and cryptographic signatures to ensure packages haven’t been tampered with.npm ci, pnpm audit, pip hash
Signed PackagesEnforce digital signatures on artifacts to confirm authenticity.Sigstore, Cosign, GitHub Sigstore
Audit DependenciesRegularly scan for vulnerabilities in dependencies and transitive dependencies.npm audit, pnpm audit, GitHub Dependabot
Pin VersionsCommit lockfiles (package-lock.json, yarn.lock, Gemfile.lock) to prevent unexpected updates.npm ci, pnpm install --frozen-lockfile
Zero-Trust ArchitectureTreat all third-party code as untrusted until verified.Network segmentation, least privilege access
CI/CD SecuritySecure build pipelines with access controls, secrets management, and monitoring.GitHub Actions, GitLab CI, CircleCI
SBOM (Software Bill of Materials)Maintain an inventory of all components to quickly identify and remediate vulnerabilities.Syft, Dependency-Track, GitHub SBOM
Automated ScanningIntegrate SAST, SCA, and secrets scanning into CI/CD.Snyk, Dependabot, GitHub Advanced Security
Incident Response PlansDevelop and test procedures for responding to supply chain compromises.Custom playbooks, GitHub Security Advisories

Tools and Services to Enhance Supply Chain Security

Tool/ServiceKey FeaturesHow It Helps
DepsGuardScans and fixes package manager configs (npm, pnpm, Yarn, Bun, uv). Zero dependencies.Automates cooldown enforcement and security settings.
StepSecurityGitHub PR check that fails PRs introducing npm packages released within a configurable cooldown.Prevents introduction of fresh malicious packages.
OpenRewriteAutomates adding cooldown sections to Dependabot config files.Ensures dependency update tools respect cooldown policies.
DependabotConfigurable cooldowns by semantic version type (e.g., ignore: [{ dependency-name: "*", versions: ["< 7 days"] }]).Manages dependency updates with security delays.
RenovateSupports minimumReleaseAge with human-readable durations (e.g., "7 days"). Default: 3 days for npm.Automates dependency updates with cooldowns.
pnpm 11+Built-in minimumReleaseAge, blockExoticSubdeps, and trustPolicy settings.Enforces cooldowns and restricts untrusted dependency sources.
npm ciPrevents builds from pulling new versions not in the lockfile.Maintains build integrity in CI/CD pipelines.
GitHub ActionsSupports cooldown checks, secrets scanning, and dependency review.Detects compromised packages and prevents unauthorized access.

Comparative Table of Cooldown Configurations

Package ManagerConfig FileSetting NameUnitDefault CooldownOverride CommandExclusions
npm~/.npmrcmin-release-ageDaysNonenpm install <pkg> --min-release-age 0None (as of May 2026)
pnpm~/.config/pnpm/rcminimum-release-ageMinutes1 day (1440 min)pnpm add <pkg> --minimum-release-age 0minimum-release-age-exclude
Bun~/.bunfig.tomlminimumReleaseAgeSecondsNonebun add <pkg> --minimum-release-age 0None
Yarn.yarnrc.ymlnpmMinimalAgeGateMinutesNoneNot supportednpmPreapprovedPackages
uv (Python)Command-line--exclude-newerRelative (e.g., 7d)Noneuv pip install --exclude-newer "0 days"None
pip (Python)Command-line--uploaded-prior-toAbsolute/RelativeNonepip install --uploaded-prior-to "0 days"None
RubyGemsRegistry-level (gem.coop)N/AN/A48 hoursNot applicableNot applicable

Conclusion

Supply chain attacks are a growing and severe threat to software development, but cooldown phases provide a simple yet powerful defense. By delaying the installation of newly released packages, developers gain critical time to detect and mitigate malicious releases.

Key Takeaways

  1. Implement cooldowns in your package managers (npm, pnpm, Bun, Yarn, pip, uv, RubyGems).
  2. Combine cooldowns with other security measures:
    • Verify package integrity (signatures, checksums).
    • Audit dependencies regularly.
    • Pin versions and commit lockfiles.
    • Secure CI/CD pipelines.
    • Adopt zero-trust principles.
  3. Use automation tools like DepsGuard, StepSecurity, and OpenRewrite to enforce cooldowns and audit configurations.
  4. Stay informed about supply chain threats and best practices (e.g., cooldowns.dev).

Call to Action

By adopting these practices, you can significantly reduce the risk of supply chain compromises and build more secure software.

References

Feedback

Have thoughts or experiences you'd like to share? I'd love to hear from you! Whether you agree, disagree, or have a different perspective, your feedback is always welcome. Drop me an email and let's start a conversation.

<​​​​supply-chain-security​​​@exiguus​.​​blog​​​>

Tags