Skip to content

Beautiful, AI-native markdown IDE and LLM wiki

Add uniform 3-day dependency cooldown (pnpm + bun + Dependabot) (#2183)

Nick Gomez6783bfb3d70f
diff --git a/bunfig.toml b/bunfig.toml
index 5911d5cf6..a351389dd 100644
--- a/bunfig.toml
+++ b/bunfig.toml
@@ -1 +1,9 @@
strictEngines = true
+
+[install]
+# Supply-chain cooldown (admission-time): refuse npm versions published less than
+# 3 days ago, to dodge freshly-published malware. Unit = SECONDS (259200 = 3 days).
+# Own-org packages (@inkeep/*) are exempt. NOTE: bun's exclude key is PLURAL
+# (minimumReleaseAgeExcludes); pnpm's is singular (minimumReleaseAgeExclude).
+minimumReleaseAge = 259200
+minimumReleaseAgeExcludes = ["@inkeep/*"]
diff --git a/scripts/bun-install-ci.sh b/scripts/bun-install-ci.sh
index 54781fc58..7f82ffd57 100755
--- a/scripts/bun-install-ci.sh
+++ b/scripts/bun-install-ci.sh
@@ -140,7 +140,14 @@ fi
if [ -n "$BUN_INSTALL_CMD" ]; then
INSTALL_ARGV=("$BUN_INSTALL_CMD")
else
- INSTALL_ARGV=(bun install --frozen-lockfile)
+ # --minimum-release-age=0: this is a REPRODUCTION install of the committed,
+ # reviewed bun.lock, so it must not re-apply the supply-chain cooldown
+ # (bunfig.toml minimumReleaseAge) and reject an already-locked but recently
+ # published dependency. bun enforces minimumReleaseAge during frozen
+ # range-resolution and has no trust-the-lockfile opt-out (oven-sh/bun#30525,
+ # #30526), so we neutralize it here. The cooldown still gates `bun add` /
+ # `bun update` (admission), which is where supply-chain protection belongs.
+ INSTALL_ARGV=(bun install --frozen-lockfile --minimum-release-age=0)
fi
# Run one attempt directly (no watchdog). Used when BUN_INSTALL_ATTEMPT_TIMEOUT