Skip to content

fix(deps): stop shipping rollup binary to consumers; harden CI, release and dependencies - #157

Merged
ShellXploit merged 8 commits into
mainfrom
chore/security-hardening
Oct 23, 2026
Merged

ShellXploit merged 8 commits into
mainfrom
chore/security-hardening

Conversation

@ShellXploit

@ShellXploit ShellXploit commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner

Fixes from the 2026-10-23 security review (at v1.3.4).

ID Change
H1 packageManager bun@1.2.2 → bun@1.4.4; setup-bun reads it via bun-version-file: package.json in CI and release
M1 Release job drops setup-node. bun publish cannot do OIDC trusted publishing or provenance yet (Bun 1.4.4 docs; oven-sh/bun#15601, #22423), so @semantic-release/npm still publishes with the npm CLI pinned in bun.lock (11.21.1) on the runner's Node 22. The old setup-node warning came from .yarnrc.yml pointing at a deleted Yarn release
M2 bun audit: 111 → 1. tsup 9 (esbuild ^0.28.2); fresh resolve; safe-buffer override keeps jws/jwa on 5.2.1. Remaining: braces@3.0.3 (GHSA-vfj7-8cjw-p6xm, dev-only via semantic-release/micromatch), no patched version published. Production tree: 0 advisories; CI now runs bun audit --prod
M3 bun.lock regenerated: 0/670 entries without integrity (was 448/736); bun install --frozen-lockfile in every job
M4 Actions referenced by exact tag and locked in .github/workflows/actions.lock (GitHub workflow lockfiles, public preview), verified in CI with gh actions-lock --verify
M5 @rollup/rollup-linux-x64-gnu moved to devDependencies; packed manifest only depends on jsonwebtoken
L1 Release runs on push to main, calls CI (workflow_call) and releases via needs: ci in the release environment; workflow_run removed
L2 actions: write removed from CI
L3 Dependabot cooldown.default-days: 7 (bun, github-actions); bunfig [install] minimumReleaseAge = 604800
L4 persist-credentials: false in CI; the release job keeps credentials because semantic-release pushes the release commit and tag
misc .DS_Store ignored, stale .yarnrc.yml removed, CONTRIBUTING uses Bun, README warns that the mock tokens are for tests only

…y tokens

- add .DS_Store to .gitignore
- remove .yarnrc.yml, which only pointed at a Yarn release removed in the
  Bun migration
- switch CONTRIBUTING dev commands from Yarn to Bun
- README: never trust the mock tokens/keys outside tests
The Linux rollup native binary is only needed to build this package in
CI, but as an optionalDependency it was part of the published manifest
and got installed by every consumer on linux-x64. Move it to
devDependencies so the published dependency tree is just jsonwebtoken.
- dependabot: cooldown.default-days 7 for the bun and github-actions
  ecosystems (version updates only; security updates are not delayed)
- bunfig: [install] minimumReleaseAge = 604800 (seconds) so local
  bun install/update only resolve versions at least 7 days old.
  Dependabot does not read bunfig, hence both settings.
- packageManager: bun@1.2.2 -> bun@1.4.4 (latest stable, 2026-10-22)
- regenerate bun.lock from scratch: the lockfile carried over from the
  Yarn migration had 448/736 entries without an integrity hash, which
  bun never verifies; all 670 entries now have sha512 integrity.
  The fresh resolve also records every rollup native binary instead of
  only darwin-arm64
- tsup ^8.5.1 -> ^9.0.0 (esbuild ^0.28.2, fixes GHSA-g7r4-m6w7-qqqr);
  emitted JS is byte-identical, .d.ts only reformatted
- override safe-buffer ^5.2.1 so the fresh dedupe does not downgrade
  jws/jwa/ecdsa-sig-formatter to safe-buffer 5.1.2

bun audit: 111 -> 1 advisory. Remaining: braces@3.0.3
(GHSA-vfj7-8cjw-p6xm, high) via micromatch in semantic-release
tooling; no patched version is published. Production tree: 0.
- release.yaml now triggers on push to main (and workflow_dispatch),
  calls ci.yaml as a reusable workflow and only releases via
  needs: ci. This replaces the workflow_run trigger, whose
  branches: [main] filter also matches fork PRs from a branch named main
- release job runs in the "release" environment so deployment branch
  rules can restrict publishing to main
- CI no longer runs on push itself (release.yaml runs it), keeps
  pull_request and workflow_dispatch; only PR runs cancel in progress
- drop actions: write from CI; workflows default to contents: read
- actions/checkout persist-credentials: false in CI; the release job keeps
  credentials because semantic-release pushes the release commit and tag
- setup-bun reads the Bun version from package.json packageManager
- bun install --frozen-lockfile everywhere; bun audit --prod in CI
- drop setup-node from the release job: bun publish cannot do OIDC
  trusted publishing/provenance yet, so @semantic-release/npm keeps using
  the npm CLI pinned in bun.lock (11.21.1) on the runner's Node
- pin checkout v7.0.1, setup-bun v2.2.0 and codecov-action v7.1.1 to
  full commit SHAs with version comments for Dependabot
Reference actions by exact release tag and pin them, including the
transitive actions/github-script used by codecov-action, in
.github/workflows/actions.lock, generated with gh actions-lock v0.3.0
(GitHub Actions workflow lockfiles, public preview). Dependabot
regenerates the lockfile entry when it bumps an action. CI verifies the
lockfile with gh actions-lock --verify.
@ShellXploit ShellXploit changed the title chore: security hardening for CI, release and dependencies fix(deps): stop shipping rollup binary to consumers; harden CI, release and dependencies Oct 23, 2026
@codecov

codecov Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (68ceee0) to head (a692142).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #157      +/-   ##
===========================================
+ Coverage   99.65%   100.00%   +0.34%     
===========================================
  Files          15        15              
  Lines         291       278      -13     
===========================================
- Hits          290       278      -12     
+ Misses          1         0       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

bun.lock now records rollup's own platform binaries, so the explicit
@rollup/rollup-linux-x64-gnu pin is no longer needed.
@ShellXploit
ShellXploit merged commit 1b4bca4 into main Oct 23, 2026
8 checks passed
@ShellXploit
ShellXploit deleted the chore/security-hardening branch October 23, 2026 12:29
github-actions Bot pushed a commit that referenced this pull request Oct 23, 2026
## [1.3.5](v1.3.4...v1.3.5) (2026-10-23)

### Bug Fixes

* **deps:** stop shipping rollup binary to consumers; harden CI, release and dependencies ([#157](#157)) ([1b4bca4](1b4bca4))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.3.5 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant