Skip to content

Audit workflow: cargo-deny + Trivy on every lockfile, failing on stale ignores (sc-9611) - #257

Merged
ndbroadbent merged 1 commit into
mainfrom
ci-audits
Dec 5, 2026
Merged

ndbroadbent merged 1 commit into
mainfrom
ci-audits

Conversation

@ndbroadbent

@ndbroadbent ndbroadbent commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Third PR for sc-9611: dependency audit and licence policy. It's stacked on #256 (for mise.toml) and retargets once that merges.

New workflow: Audit (job audit). It runs on pull requests, on pushes to main, and daily at 04:41 UTC.

  • cargo-deny 0.22.3 checks the three Rust workspaces: the root, clients/gallery/rust, and its Loco example. Each has a deny.toml beside its manifest covering RustSec advisories (yanked crates fail), a licence allow list (exactly what each graph uses today), and crates.io as the only source. It runs with -D advisory-not-detected -D license-not-encountered, so a stale ignore or an allowed licence nothing uses fails.
  • Trivy 0.77.0 scans every lockfile: Cargo, pnpm (dev dependencies included), Bundler and pip. Only fixable findings fail it. Ignores go in .trivyignore.yaml, each with a statement and an expired_at at most six months out.

Why a separate workflow: release.yml publishes the CLI only after a green CI on main. A new advisory can turn the audit red without any change in the repo, and it shouldn't hold back a release. On PRs it gates like any other check; on main, a failure reaches the coordinator through the existing failure subscription.

It starts green:

  • pin-project-lite 0.2.18 was yanked: cargo update -p pin-project-lite (Cargo.lock only).
  • RUSTSEC-2023-0071 (rsa, the Marvin timing attack) is ignored with a reason. It's a dev-dependency only, used in app/'s tests, and has no fixed 0.9 release.
  • CVE-2026-25537 (jsonwebtoken 9.3.1) is ignored until 5 Jun 2027. app/ only signs JWTs (forge/github_app.rs); the bug is in validating them when decoding. The upgrade to 10.3+ is sc-9664.
  • The Loco example allows MPL-2.0 (colored): it's an example app nobody ships.
  • wildcards = "allow": the only wildcards are the CLI's and renderer's path dependencies on our own crates. Adding versions there would force a CLI release, and crates.io refuses published wildcards anyway.

Not used: pnpm audit. It reads the gallery workspace's astro/ folder as the npm package astro and reports 19 advisories, all for versions older than the 7.4.14 in the lockfile.

Checked locally: cargo-deny passes all three workspaces, Trivy exits 0 over 10 lockfiles, and actionlint and zizmor are clean.

After merge: add audit to main's required checks, once it has run on main.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ree Rust workspaces and Trivy for every lockfile, failing on stale ignores; pnpm overrides for the gallery example sites' vulnerable build tooling, so it starts green (sc-9611)
@ndbroadbent
ndbroadbent merged commit 2aab8a2 into main Dec 5, 2026
18 checks passed
@ndbroadbent
ndbroadbent deleted the ci-audits branch December 5, 2026 16:55
@ndbroadbent
ndbroadbent restored the ci-audits branch December 5, 2026 16:56
@ndbroadbent
ndbroadbent deleted the ci-audits branch December 5, 2026 16:56
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