Skip to content

Only install package versions that have been public for 7 days - #1533

Merged
rt2zz merged 1 commit into
masterfrom
chore/minimum-release-age
Nov 3, 2026
Merged

rt2zz merged 1 commit into
masterfrom
chore/minimum-release-age

Conversation

@rt2zz

@rt2zz rt2zz commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Adds a bunfig.toml with minimumReleaseAge = 604800 (7 days), the window in which most malicious releases are caught and pulled. Bun then won't resolve a version newer than that, for new dependencies or updates. For an urgent security fix, one install can opt out with bun add --minimum-release-age=0 <pkg>.

  • Bun reads bunfig.toml only from the directory it runs in, not parent directories (checked), so scripts/storage-fixtures gets its own copy. It also gets a bun.lock, which it didn't have before: redux 4.2.1, redux-persist 5.10.0 and 6.0.0, and @babel/runtime. Regenerating the fixtures with it writes identical bytes.
  • CONTRIBUTING mentions the policy, and AGENTS.md says not to override it when adding dependencies.

Dependency changes

#1532 installed vitest with a 3-day minimum, so part of its tree was newer than 7 days. Re-resolved under the policy, all patch-level:

  • rolldown (and its platform bindings) 1.2.16 → 1.2.15
  • @oxc-project/types 0.156.0 → 0.155.0
  • magic-string 1.4.5 → 1.4.4

Every package in bun.lock is now at least 7 days old (checked against npm publish times). The npm pinned in the publish workflow (11.21.1) is from Oct 15.

Note: Bun applies the minimum age when it resolves versions, not to versions already in bun.lock. So bun install --frozen-lockfile in CI doesn't re-check it.

bunfig.toml sets minimumReleaseAge to 7 days, the window in which most
malicious releases are caught and pulled. Bun reads bunfig.toml only from
the directory it runs in, so scripts/storage-fixtures has its own copy, and
now a lockfile.

The vitest tree from #1532 was installed with a 3-day minimum; re-resolved
under 7 days, rolldown 1.2.16 -> 1.2.15, @oxc-project/types 0.156.0 ->
0.155.0 and magic-string 1.4.5 -> 1.4.4.
@rt2zz
rt2zz requested a review from Andarist as a code owner November 3, 2026 00:36
@rt2zz
rt2zz merged commit 9e0661e into master Nov 3, 2026
3 checks passed
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