Skip to content

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

Open
rubenvdlinde wants to merge 1 commit into
developmentfrom
chore/npm-supply-chain-cooldown
Open

chore(security): require 24h cooldown on npm packages#152
rubenvdlinde wants to merge 1 commit into
developmentfrom
chore/npm-supply-chain-cooldown

Conversation

@rubenvdlinde
Copy link
Copy Markdown
Contributor

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`.
@github-actions
Copy link
Copy Markdown
Contributor

Quality Report — ConductionNL/mydash @ b3569e4

Check PHP Vue Security License Tests
lint
phpcs
phpmd
psalm
phpstan
phpmetrics
eslint
stylelint
composer ✅ 100/100
npm ✅ 501/501
PHPUnit
Newman
Playwright ⏭️

Coverage: 90.7% (127/140 statements)


Quality workflow — 2026-05-16 15:31 UTC

Download the full PDF report from the workflow artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant