Skip to content

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

Closed

Description

@malibio

Summary (P2, net-new from July 2026 review)

No dependency-advisory scanning runs in CI — .github/workflows/ has only release + nightly-webkit. The dependency graph is otherwise fully pinned (no git/path/wildcard deps; both Cargo.lock and bun.lock committed), so this is the missing detection layer for known-vulnerable transitive deps.

Acceptance criteria

  • CI job runs cargo audit (RustSec advisory DB) on PRs
  • CI job runs bun audit on PRs
  • Failing advisories block or visibly flag the PR

Context

  • Threat T9 (supply chain): nodespace-docs/architecture/security-posture.md

Activity

  1. mstomar125 commented on Jul 24, 2026

    @mstomar125
    Contributor

    Status: workflow implemented & correct — PARKED pending advisory remediation (#1728)

    The audit gate is built and reviewed in PR #1727 (converted to draft). It is not being merged yet, because merging a hard-fail gate onto the current tree would red every PR regardless of that PR's changes — providing no signal until the pre-existing backlog is cleared.

    What was done

    • New .github/workflows/audit.yml: two independent PR jobs — cargo audit (RustSec) and bun audit. No continue-on-error (advisories fail hard, per the ACs). Safe pull_request trigger (not pull_request_target), permissions: contents: read, concurrency cancel-in-progress. House-style aligned (actions/checkout@v7, oven-sh/setup-bun@v2 pinned to 1.3.11).
    • Independent adversarial review: CONFIRMED-GOOD.

    The gate works — proven by running on its own PR (run 30093186957)

    It immediately surfaced real, pre-existing debt:

    Rust — 8 vulnerabilities (all transitive):

    • rustls-webpki ×4 — RUSTSEC-2026-0098/-0099 (name-constraint bypass, URI & wildcard), -0049 (CRL distribution-point matching), -0104 (reachable panic in CRL parsing) — TLS cert-validation path, top priority
    • quinn-proto — RUSTSEC-2026-0185 (remote memory-exhaustion DoS)
    • quick-xml ×2 — RUSTSEC-2026-0194/-0195 (quadratic-runtime + unbounded-alloc DoS)
    • crossbeam-epoch — RUSTSEC-2026-0204 (invalid pointer deref)

    Plus 25 warnings (unmaintained gtk-rs GTK3 bindings via Tauri; bincode, paste, proc-macro-error, unic-*; anyhow/lru/memmap2/scc unsoundness).

    npm — 57 advisories (4 critical / 18 high / 30 moderate / 5 low), predominantly dev/test tooling (@vitest/browser critical, jsdom, ws, mermaid ×4, @sveltejs/kit/adapter-*, devalue). bun audit --prod does not reduce the count.

    Why parked (not merged, not closed)

    Merging the hard gate now = permanent red on main until the 8 Rust vulns + 57 npm advisories are triaged. That's a separate, breaking-change-risk remediation (semver cargo update for the Rust vulns; selective/major bumps + accepted-risk triage for npm), tracked in #1728. I won't blanket-ignore 8 real vulns to force this through, and I won't merge a gate that's red-by-default.

    Path to close

    1. Clear the backlog per Remediate pre-existing dependency advisories (8 Rust vulns + 57 npm) blocking the #1719 audit gate #1728 (or add a justified audit.toml allowlist for the unmaintained-only Rust warnings).
    2. Get cargo audit + bun audit to exit 0 on main.
    3. Un-draft & merge PR Add cargo audit / bun audit CI gate (closes #1719) #1727 → gate goes live green, reddening only on new advisories.
  2. mstomar125 commented on Jul 25, 2026

    @mstomar125
    Contributor

    ✅ Completed — audit gate is live and green (PR #1745)

    The Dependency audit workflow (.github/workflows/audit.yml) now runs on every PR with both jobs green:

    • cargo audit (RustSec) — reads .cargo/audit.toml (6 upstream-blocked advisories accepted-with-tracking).
    • bun audit — runs scripts/audit-npm.ts, a self-documenting allowlist wrapper (18 dev/build/test-only + upstream-pinned advisories).

    This was blocked because the tree carried 8 Rust vulns + 61 npm advisories that would have red-checked every PR. That backlog was remediated in the same PR (#1728): 2 Rust vulns fixed via cargo update, 14 production/framework npm advisories fixed via same-major overrides (incl. critical shell-quote, high @grpc/grpc-js/protobufjs/devalue), the rest allowlisted with per-entry justification + tracked follow-ups (#1743, #1744).

    Verified on this PR: both audit checks reported SUCCESS, and the gate still fails on any new advisory in a non-allowlisted (incl. production) package. Independent adversarial review CONFIRMED-GOOD (no accepted advisory is a real shipped risk).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions