Skip to content

ci(security): blocking bun audit policy, secret scan and workflow lint - #1860

Merged
magic-peach merged 4 commits into
mainfrom
ci/security-gate
Nov 5, 2026
Merged

magic-peach merged 4 commits into
mainfrom
ci/security-gate

Conversation

@magic-peach

Copy link
Copy Markdown
Collaborator

Phase 6: the dependency security gate from the old ci/security-pipeline branch, ported as a fresh PR on main. The old branch's Snyk jobs are left out, because Snyk has its own workflow (snyk.yml) and you deferred further Snyk work.

.github/workflows/security.yml

It runs on PRs to main, pushes to main, weekly (Mondays 04:17 UTC) and on demand. Permissions are contents: read, and it uses no secrets, so fork PRs are covered.

Job Checks Blocks
Dependency policy (bun.lock) bun audit --json piped through scripts/security/audit-policy.mjs with security/audit-exceptions.json any high or critical advisory without a valid exception
Secret scan (gitleaks 8.21.2, pinned and checksum-verified) the PR's new commits (the full history on main), values redacted yes
Workflow lint (actionlint 1.7.7) all workflows, with shellcheck yes

Policy rules:

  • Moderate and low advisories are listed but never block.
  • Every exception needs a reason, a review date and an expiry at most 90 days out. Expired exceptions block again, and unused ones are reported.
  • Run locally with bun run audit.

Dependency fixes, so the gate starts green

main currently has 1 critical and 20 high advisories, all in dev, test or build tooling.

  • Storybook: all packages 10.5.10 → 10.6.6 (critical, plus image-size).
  • vitest: 4.1.11 → 4.1.12.
  • overrides, within existing ranges: undici ^7.30.1 (jsdom), vite ^8.2.4, zod ^4.6.6 (eslint-plugin-react-hooks), source-map-js ^1.2.2. The existing @types/react* pins are kept.
  • Runtime packages are unchanged. That includes @ffmpeg/ffmpeg, Datadog RUM, React and Next. A plain bun update would have moved @ffmpeg/ffmpeg 0.12.10 → 0.12.15 and RUM 7.10 → 7.17, which don't belong in a security PR, so the lockfile changes are limited to the packages above and their own dependencies.
  • Reviewed exceptions, until 2027-02-03:
    • brace-expansion (two advisories): ESLint's minimatch, which only expands patterns written in the repo. Two majors are in use, and bun has no nested overrides to pin both.
    • webpack-dev-middleware: Storybook's local dev server. The fix is v7, which Storybook 10.6 doesn't allow.

Result: 0 blocking, 5 excepted, 14 moderate or low.

Verified locally

  • bun run audit exits 0.
  • gitleaks over the full history (654 commits) finds no leaks.
  • actionlint (local, and the CI Docker image with shellcheck) passes on every workflow.
  • Typecheck, lint, 551 unit tests (including auditPolicy.test.ts), the app build and build-storybook all pass.

Docs

docs/SECURITY-PIPELINE.md: the checks, the policy, how to fix or add an exception, and today's triage.

Optional maintainer step: add the three jobs as required checks on main.

Ported from the old ci/security-pipeline branch, without its Snyk jobs
(snyk.yml covers Snyk): security.yml runs on PRs, main and weekly with
read-only permissions and no secrets.

- Dependency policy: bun audit on bun.lock through
  scripts/security/audit-policy.mjs; unexcepted high/critical block,
  exceptions need a reason and an expiry within 90 days.
- Secret scan: gitleaks (pinned, checksum-verified, redacted).
- Workflow lint: actionlint with shellcheck.

Dependencies fixed so the gate starts green, dev tooling only: Storybook
10.6.6, vitest 4.1.12, and overrides lifting undici, vite, zod and
source-map-js within range. Runtime packages are unchanged.
brace-expansion (ESLint) and webpack-dev-middleware (Storybook dev
server) are reviewed, dated exceptions.
@netlify

netlify Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for reframe-os ready!

Name Link
🔨 Latest commit 658c3fc
🔍 Latest deploy log https://app.netlify.com/projects/reframe-os/deploys/6aecdb9dd7076544f8b543c5
😎 Deploy Preview https://deploy-preview-1860--reframe-os.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@magic-peach
magic-peach merged commit d1ff303 into main Nov 5, 2026
19 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