Skip to content

chore(security): add cooldown for supply chain protection - #1567

Merged
dyoshikawa merged 3 commits into
dyoshikawa:mainfrom
saitota:chore/supply-chain-cooldown
Apr 27, 2026
Merged

chore(security): add cooldown for supply chain protection#1567
dyoshikawa merged 3 commits into
dyoshikawa:mainfrom
saitota:chore/supply-chain-cooldown

Conversation

@saitota

@saitota saitota commented Apr 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds 7-day cooldown to mitigate supply chain attacks (Trivy/LiteLLM/axios in March 2026).

  • pnpm-workspace.yaml: minimumReleaseAge: 10080 (7 days, in minutes)
  • .github/dependabot.yml: cooldown.default-days 1 → 7 (npm + github-actions)

Refs

saitota added 2 commits April 25, 2026 22:30
- pnpm-workspace.yaml: minimumReleaseAge=10080 (7 days)
- dependabot.yml: cooldown.default-days 1 -> 7
@cm-dyoshikawa

Copy link
Copy Markdown
Collaborator

@saitota

Thanks for putting this together. The CI action bumps look good to me, please go ahead with those.

On the cooldown side though, I think 7 days is too long for this project. The main concern is that it also delays security fixes by the same amount — if a CVE drops on a transitive dep, we'd be sitting on the patched version for a week before pnpm even considers it. pnpm's own docs note that "in most cases malicious releases are removed from the registry within an hour," and their example config uses 1 day (1440 minutes), so 7 days is well above what the upstream guidance suggests.

Also worth remembering that minimumReleaseAge is a floor, not a ceiling — any downstream user who wants a longer window can extend it on their side without us baking it into the project default.

I'd like to drop this to 1 day (1440) at least for now. Same change to cooldown.default-days in dependabot.yml — 1 day there feels right too. Happy to revisit if we see a concrete incident that a longer window would have caught.

@dyoshikawa dyoshikawa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR — the motivation is solid and the references are helpful. I'm on board with bumping the GitHub Actions cooldown to 7 days since those updates are less urgent.

However, I think 7 days is too aggressive for the npm side. The pnpm docs themselves note that "in most cases, malicious releases are discovered and removed from the registry within an hour" (https://pnpm.io/settings#minimumreleaseage). A 7-day gate could actually hurt us by delaying adoption of critical security fixes. A 1-day cooldown should be more than enough for this project, and users who want stricter protection can always extend it in their own setup.

Comment thread pnpm-workspace.yaml Outdated
@@ -0,0 +1 @@
minimumReleaseAge: 10080 # 7 days

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would suggest setting this to 1440 (1 day) rather than 10080 (7 days). The pnpm docs say: "In most cases, malicious releases are discovered and removed from the registry within an hour" (https://pnpm.io/settings#minimumreleaseage). Seven days risks blocking timely security patches without a proportional safety gain. A 1-day window already covers the vast majority of supply chain threats while keeping us responsive to legitimate fixes.

Comment thread .github/dependabot.yml Outdated
interval: "weekly"
cooldown:
default-days: 1
default-days: 7

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same reasoning as the pnpm setting — for npm dependencies, I think default-days: 1 is sufficient here. Most malicious packages are caught well within that window, and a 7-day delay could slow down important security updates.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated both to 1 day. Thanks for the review!

@saitota saitota changed the title chore(security): add 7-day cooldown for supply chain protection chore(security): add ~7-day~ 1-day cooldown for supply chain protection Apr 26, 2026
@saitota saitota changed the title chore(security): add ~7-day~ 1-day cooldown for supply chain protection chore(security): add cooldown for supply chain protection Apr 26, 2026
@dyoshikawa
dyoshikawa merged commit 8b5216d into dyoshikawa:main Apr 27, 2026
6 checks passed
@dyoshikawa

Copy link
Copy Markdown
Owner

@saitota Thank you!

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.

3 participants