feat: set default minimumReleaseAge to 3 days (259200s)#28729
Open
sotanengel wants to merge 2 commits intooven-sh:mainfrom
Open
feat: set default minimumReleaseAge to 3 days (259200s)#28729sotanengel wants to merge 2 commits intooven-sh:mainfrom
sotanengel wants to merge 2 commits intooven-sh:mainfrom
Conversation
Protect users from supply chain attacks by defaulting minimumReleaseAge to 3 days (259200 seconds = 259200000ms) instead of no restriction. Recent supply chain attacks (March 2026: axios, LiteLLM, Trivy) showed that malicious packages are typically published and quickly removed within hours or days. A 3-day cooldown window provides protection while minimizing disruption to most workflows. Users can disable the default by setting: - bunfig.toml: minimumReleaseAge = 0 - CLI: --minimum-release-age 0 Reference: https://nesbitt.io/2026/03/04/package-managers-need-to-cool-down.html Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
WalkthroughThe default minimum release age for packages is changed from null (no minimum) to 259200000 milliseconds (3 days) in PackageManagerOptions. A test is updated to explicitly disable this new default behavior using a CLI flag. Changes
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛡️ Motivation: Recent Supply Chain Attacks
This change is motivated by a wave of confirmed supply chain attacks in 2025–2026:
Key finding: According to Andrew Nesbitt's research, 8 out of 10 recent supply chain attacks were detected and removed within 1 week of publication. A 3-day cooldown would have blocked most of them automatically.
🔧 What This PR Does
Sets the default
minimumReleaseAgeto259200seconds (3 days = 3 × 24 × 60 × 60).minimumReleaseAge = 0inbunfig.tomlto restore the previous behavior📋 Compliance Alignment
🔗 References
✅ How did you verify your code works?
test/cli/install/minimum-release-age.test.ts— the "frozen lockfile" test now explicitly passes--minimum-release-age 0on the initial install to bypass the new default, confirming the flag works as an opt-out mechanism.minimum_release_age_msis non-null by default, so the existing guard (if (options.minimum_release_age_ms) |age_ms|) in the install path will enforce the cooldown without any user configuration.minimumReleaseAge = 0inbunfig.tomlor passing--minimum-release-age 0on the CLI correctly overrides the default back to no restriction.