Skip to content

Add cargo audit / bun audit CI gate (closes #1719) - #1727

Closed
mstomar125 wants to merge 1 commit into
mainfrom
worktree-issue-1719-audit-ci-gate
Closed

mstomar125 wants to merge 1 commit into
mainfrom
worktree-issue-1719-audit-ci-gate

Conversation

@mstomar125

Copy link
Copy Markdown
Contributor

Summary

Adds the missing detection layer for supply-chain threat T9. The dependency graph is already fully pinned (no git/path/wildcard deps; Cargo.lock + bun.lock committed), but nothing scanned those pins against a live advisory database. This adds a Dependency audit workflow that runs cargo audit (RustSec) and bun audit on every PR; a live advisory fails its job and surfaces as a red check.

Changes

  • .github/workflows/audit.yml (new) — two independent jobs on ubuntu-latest:
    • cargo audit (RustSec) — installs cargo-audit via taiki-e/install-action@v2, runs cargo audit (reads Cargo.lock only, no build/toolchain-target setup needed).
    • bun audit — bun install --frozen-lockfile then bun audit.
  • Triggers on pull_request (not the dangerous pull_request_target, so untrusted PR code runs with a read-only token) + workflow_dispatch.
  • permissions: contents: read (minimal), concurrency with cancel-in-progress.

House-style alignment

Matches the repo's existing workflows: actions/checkout@v7 and oven-sh/setup-bun@v2 pinned to bun-version: "1.3.11" (per an independent review comparing against release.yml / nightly-webkit.yml).

Notes

  • No continue-on-error anywhere — advisories fail hard, as intended.
  • To make these block merge, add cargo audit (RustSec) and bun audit as required status checks in branch-protection (a repo-settings concern, outside this YAML).

Verification

  • YAML well-formed; pre-push gate (test:all + cargo build + test:e2e) green.
  • Independent adversarial review: CONFIRMED-GOOD — commands resolve, both lockfiles present, no secrets, pull_request (not _target) is the safe trigger.

Closes #1719.

No dependency-advisory scanning ran in CI. Adds a `Dependency audit`
workflow running `cargo audit` (RustSec DB) and `bun audit` on every PR
(+ workflow_dispatch); a live advisory fails its job and surfaces as a red
check on the PR. The dependency graph is already fully pinned (Cargo.lock +
bun.lock committed), so this closes the missing DETECTION layer for the T9
supply-chain hardening bar.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@mstomar125

Copy link
Copy Markdown
Contributor Author

Superseded by #1745, which lands the audit gate together with the advisory remediation (#1728) so both jobs go green. Closing this standalone draft.

@mstomar125 mstomar125 closed this Jul 25, 2026
@malibio
malibio deleted the worktree-issue-1719-audit-ci-gate branch July 30, 2026 15:24
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.

Add cargo audit / bun audit dependency-advisory gate to CI

1 participant