agentic/code/frameworks/security-engineering/skills/bun-release-age-gate/SKILL.md
Configure Bun's install.minimumReleaseAge gate (7-day default, 10-day high-sensitivity) for JavaScript projects on Bun. Includes Corepack-equivalent version detection and lockfile-caveat warning.
npx skillsauth add jmagly/aiwg bun-release-age-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.30data-ai
Report which research-corpus radar sidecars are overdue for refresh. Computes staleness (days since last refresh vs the cadence window) for every radar, sorted most-overdue-first. Runs via `aiwg corpus radar-status`.
data-ai
Aggregate research-corpus radar sidecars into a corpus or per-cluster freshness report — totals, overdue count, per-cluster / per-GRADE / per-trajectory breakdowns, an overdue table, and per-radar rationale snippets. Runs via `aiwg corpus radar-report`.
testing
Scaffold radar/freshness sidecars for research-corpus REFs. Pulls title/authors from the citation sidecar and GRADE from the analysis doc, defaults the refresh cadence from GRADE and the cluster from a corpus-local map, and stamps documentation/radar/REF-XXX-radar.md. Runs via `aiwg corpus radar-init`.
data-ai
Compute an entity's publication trajectory — per-year paper counts, topic drift, hot-streak detection (≥3 consecutive A-grade years), and career phase. Runs via `aiwg corpus profile-temporal`.