Wait before installing newly-published versions
Every major Node package manager now supports a minimum release age gate: pnpm 10, npm 11.5, and Bun 1.3. Set it to 1 day at minimum, 3 days for security-sensitive projects.
The May 2026 TanStack compromise was live in npm for under 7 minutes. The March Axios RAT was up for about 3 hours. Anything that resolves to latest or a loose semver range during that window installs the malicious version. These configuration changes buy you a window to verify before you install. Pick the tab for your ecosystem.
Every major Node package manager now supports a minimum release age gate: pnpm 10, npm 11.5, and Bun 1.3. Set it to 1 day at minimum, 3 days for security-sensitive projects.
The lockfile is your audit trail. If something compromised slips in, it lands visibly in a diff, not silently via a transitive bump.
npm ci # not "npm install"
pnpm install --frozen-lockfile
yarn install --immutable
pip install --require-hashes -r requirements.txtnpm install in CI can pull a newly-published malicious version even when your lockfile says otherwise. The ci / frozen / immutable flags refuse to resolve anything outside the lockfile.Use exact pins (no ^ / ~) for high-blast-radius packages. Renovate or Dependabot still bumps them, but in PRs you can review, not silently at install time.
{
"dependencies": {
"@tanstack/react-router": "1.169.4",
"axios": "1.14.0"
}
}1.14.1. Anyone with ^1.14.0 pulled it on next install. Anyone pinned to 1.14.0 did not.Replace long-lived NPM_TOKEN and cloud-provider keys with OIDC-issued credentials, scoped to the specific job and time-bounded.
If your project does not need any native compilation, this is free protection. If it does, allowlist only the specific packages that need a build step.
# npm
npm install --ignore-scripts
# pnpm - interactive consent
pnpm config set ignore-scripts true
# yarn 4+
yarn config set enableScripts falsepostinstall or preinstall. Disabling scripts blocks the initial execution outright. You can re-enable per-package via pnpm onlyBuiltDependencies or an allowlist.Add a dependency-review GitHub Action to your repo to flag risky additions at PR time.
Spot something inaccurate or have a recommendation we have missed? Get in touch.
A small amount of analytics helps us understand how the scanner gets used so we can make it better. Your lockfile scanning still runs entirely in your browser. We never sell or share your data. See our Privacy Policy for details.
You can change your choice later by clearing site data for dependencywatch.io.