/security-engineering:bun-release-age-gatefrom security-engineering
Configures Bun's install.minimumReleaseAge supply-chain gate (7-day default, 10-day high-sensitivity) in bunfig.toml, with unit conversion, lockfile caveats, and Corepack-equivalent version pinning.
Ships in security-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill when a user has chosen Bun as their JavaScript runtime
and package manager and wants release-age-gate hardening parallel to
what npm-release-age-gate, pnpm-release-age-gate, and
yarn-release-age-gate provide for their respective ecosystems.
bun --version)package.json exists at repo rootbunfig.toml exists (or will be created) — Bun's config fileIf Bun is below v1.1.30, the skill should refuse to proceed:
install.minimumReleaseAge was introduced in v1.1.30 and earlier
versions silently ignore it.
Add the gate to bunfig.toml at repo root:
[install]
# Refuse dependency versions published less than 7 days ago.
# Bun interprets the value in SECONDS. 604800 = 7 days; 864000 = 10 days.
# Defends against newly-published malicious versions.
minimumReleaseAge = 604800
# Optional: reject git+ and tarball-URL sources during install
# (Bun's equivalent of pnpm's blockExoticSubdeps — check current
# version's docs for the exact key name; the API is evolving)
# safeRegistry = true
Bun uses seconds for install.minimumReleaseAge:
| Days | Seconds value |
|---|---|
| 1 | 86400 |
| 7 (recommended default) | 604800 |
| 10 (high-sensitivity profile) | 864000 |
| 14 | 1209600 |
| 30 | 2592000 |
This differs from npm (days), pnpm (minutes), and Yarn
(duration string like 7d). Document the unit inline when
committing the config so future readers don't misread it.
The gate is checked at resolution time. If bun.lockb was generated
without the gate, the gate applies on the NEXT resolution pass — not
retroactively against the existing lockfile.
To apply the gate retroactively:
# Force re-resolution
rm bun.lockb
bun install
This is destructive to existing pins. Coordinate before running.
Bun is not currently in the Corepack supported set, but version
pinning is still important. The packageManager field in
package.json can pin Bun:
node -p "require('./package.json').packageManager"
If the value is bun@<version>, that's the pinned version (CI
should use this). If empty, recommend setting it:
{
"packageManager": "[email protected]"
}
The skill should:
Genuine emergency overrides:
# Bypass the gate for a single install (rare)
bun add <pkg> --minimum-release-age=0
Document every override with reason + sunset date.
Add a verification step to the publish/build workflow:
- name: Verify Bun gate active
run: |
set -euo pipefail
GATE=$(grep -E '^\s*minimumReleaseAge\s*=' bunfig.toml | awk -F'=' '{print $2}' | tr -d ' ')
if [ -z "$GATE" ] || [ "$GATE" -lt 604800 ]; then
echo "✗ Bun install.minimumReleaseAge not configured to baseline (≥604800 = 7 days)"
exit 1
fi
echo "✓ Bun install.minimumReleaseAge = $GATE seconds"
bunfig.toml for [install] minimumReleaseAgepackage.json packageManager field for Bun version pinbun.lockb was generated AFTER the gate was committed (timestamp check)When auditing an existing Bun project, produce a structured report
at .aiwg/security/working/bun-release-age-audit.md:
# Bun Release-Age Gate Audit
**Bun version**: <version> (Pinned in package.json: yes/no)
**Gate active**: yes (604800s) / yes (864000s) / yes (custom: <value>) / no
## Findings
### <severity> — <description>
- File: <path>
- Issue: <what's wrong>
- Fix: <exact change>
## Clean Checks
- ...
## Recommendations
- ...
Bun's install API is younger than npm/pnpm/Yarn — settings names have changed across versions. The skill should:
install.minimumReleaseAge isn't recognized by the installed
version, fall back to checking for older keys (minReleaseAge,
releaseAge) and recommend upgradeWhen in doubt, run bun pm --help and bun install --help to
discover the current supported flags.
npm-release-age-gate skill — npm equivalentpnpm-release-age-gate skill — pnpm equivalentyarn-release-age-gate skill — Yarn equivalentnpm-supply-chain-audit skill — companion auditsupply-chain-hardening-quickstart skill — orchestratorbunfig.toml reference: https://bun.com/docs/runtime/bunfigminimumReleaseAge introduction: check Bun changelog for v1.1.30What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
28 skills in this plugin
/auth-factor-designDecision aid for authentication factor architecture — have/know/are mapping, coercion resistance, FIDO2 PIN/UV policy, and PRF hot-path anti-patterns./banned-api-auditScan source code for banned APIs/forbidden functions per project banlist; report violations with paths, line numbers, and recommended replacements/binary-blob-auditScan tracked repository files for committed binary blobs and report reviewability/provenance exceptionsnpx claudepluginhub jmagly/aiwg --plugin security-engineeringOther plugins' skills for the same job