Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

chore(security): require 24h cooldown on npm packages#47

Merged
rubenvdlinde merged 1 commit into
developmentfrom
chore/npm-supply-chain-cooldown
May 17, 2026
Merged

chore(security): require 24h cooldown on npm packages#47
rubenvdlinde merged 1 commit into
developmentfrom
chore/npm-supply-chain-cooldown

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Collaborator

Summary

  • .npmrc: add min-release-age=1 so npm install rejects any package version published less than 24h ago (npm 11.5+ native; older npm silently ignores it).
  • .github/dependabot.yml: new file with cooldown.default-days: 1 and @conduction/* on the cooldown-exclude list, so first-party Conduction releases still reach this app immediately while everything else cools down for 24h.

Why

Recent npm supply-chain attacks (shai-hulud, nx, et al.) all rely on a window between a compromised publish and detection — typically a few hours. A blanket 24h cooldown closes that window with no functional cost, and putting it on Dependabot specifically protects against the dominant vector (bot-generated bump PRs auto-merging a poisoned version).

@conduction/* is excluded because we publish first-party libraries (notably @conduction/nextcloud-vue) actively and need fresh releases to reach this app immediately.

Release-day escape hatch

If a contributor needs to consume a freshly-published @conduction/* version in a transitive dep within 24h of publish, the per-install override is:

npm install --min-release-age=0 @conduction/pkg@x.y.z

Test plan

  • npm install still works on this branch with no version conflicts against the existing lockfile.
  • Dependabot picks up the new config on next scheduled run (no manual trigger needed).

Defense against supply-chain attacks (e.g. shai-hulud, nx-style
compromised publishes) by blocking install of any package version
published less than 24h ago.

- .npmrc: `min-release-age=1` (npm 11.5+ native; older npm ignores it)
- .github/dependabot.yml: `cooldown.default-days: 1`, with @conduction/*
  excluded so first-party releases reach our apps immediately

For release-day consumption of fresh @conduction/* deps, use
`npm install --min-release-age=0 @conduction/pkg@x.y.z`.
@rubenvdlinde
rubenvdlinde merged commit 907cafa into development May 17, 2026
4 checks passed
@rubenvdlinde
rubenvdlinde deleted the chore/npm-supply-chain-cooldown branch May 17, 2026 07:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant