Skip to content

security: add cargo-audit supply-chain scanning in CI (Plan 00)#81

Open
tyvsmith wants to merge 2 commits into
mainfrom
sec/00-cargo-audit-ci
Open

security: add cargo-audit supply-chain scanning in CI (Plan 00)#81
tyvsmith wants to merge 2 commits into
mainfrom
sec/00-cargo-audit-ci

Conversation

@tyvsmith

@tyvsmith tyvsmith commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

Adds supply-chain CVE scanning so a known-vulnerable dependency can no longer age into a release unnoticed (Plan 00). Flagged independently by 4 of 5 security-review passes.

  • New CI job cargo-audit in .github/workflows/ci.yml runs cargo audit --deny unmaintained --deny unsound (vulnerabilities are denied by default), so any un-ignored advisory fails CI.
  • just audit mirrors the CI command locally and is folded into just check.
  • .cargo/audit.toml holds the ignore policy — every entry carries an inline justification, nothing is blanket-ignored.
  • Fixed 5 of 7 live advisories by bumping patched transitive deps in Cargo.lock (anyhow, memmap2, quinn-proto, rand, rustls-webpki/rustls). The 2 remaining (quick-xml DoS) are unfixable via cargo update (pinned by wayland-scanner ^0.39) and non-exploitable (build-time proc-macro parsing of trusted local protocol XML), so they are ignored with a documented reason, alongside core2/paste unmaintained (transitive AVIF encode / build-time proc macro, never in the auth path).

Verification

  • cargo build --workspace, cargo test --workspace, cargo clippy --workspace -- -D warnings green.
  • just audit runs locally and exits non-zero on any un-ignored advisory; watch-list crates (ort, rusqlite, image, zbus) are covered transitively via the full lockfile scan.
  • Not an auth-path change, so no container suites apply; existing build/test gates remain green beside the new audit job.

Contract docs

No docs/contracts.md / docs/security.md change (CI tooling only). CONTRIBUTING.md documents the audit workflow.

Closes #60

🤖 Generated with Claude Code

Add RustSec advisory scanning to catch dependency CVEs, flagged
independently by 4 of 5 security reviews.

- New CI job `cargo-audit` in .github/workflows/ci.yml runs
  `cargo audit --deny unmaintained --deny unsound` (vulnerabilities
  are denied by default), so any un-ignored advisory fails CI.
- `just audit` mirrors the CI command for local use; folded into
  `just check`.
- .cargo/audit.toml holds the ignore policy. Every entry carries an
  inline justification; nothing is blanket-ignored. Yanked crates are
  informational-only (no advisory ID to ignore by; the dangerous ones
  resurface as vuln/unmaintained/unsound, which are denied).

Fix 5 of the 7 live advisories by bumping patched transitive deps in
Cargo.lock (anyhow, memmap2, quinn-proto, rand, rustls-webpki/rustls).
The 2 remaining (quick-xml DoS) are unfixable via cargo update — gated
by wayland-scanner's ^0.39 pin — and non-exploitable (build-time proc
macro parsing trusted local protocol XML), so they are ignored with a
documented reason plus core2/paste unmaintained (transitive AVIF encode
and build-time proc macro, never in the auth path).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 4, 2026 20:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds RustSec supply-chain CVE scanning to Facelock’s CI and local developer workflow, ensuring Cargo.lock advisories are gated before release artifacts are produced.

Changes:

  • Adds a new GitHub Actions job (cargo-audit) that runs cargo audit --deny unmaintained --deny unsound against the lockfile.
  • Adds just audit (and folds it into just check) plus contributor documentation for the audit workflow.
  • Introduces .cargo/audit.toml ignore policy with per-advisory justifications and updates Cargo.lock to pick up patched transitive versions.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
justfile Adds audit recipe and includes it in check to mirror CI locally.
CONTRIBUTING.md Documents how to run supply-chain auditing and updates just check description.
Cargo.lock Updates transitive dependency versions/checksums to reduce active advisories.
.github/workflows/ci.yml Adds the new cargo-audit CI job running cargo audit with deny flags.
.cargo/audit.toml Adds centralized cargo-audit ignore policy with inline justification per advisory.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/ci.yml
Comment on lines +84 to +85
- name: Install cargo-audit
run: cargo install cargo-audit --locked
The workflow-level RUSTFLAGS=-Dwarnings was inherited by cargo-audit,
which compiles cargo install cargo-audit --locked against third-party
crates we don't control. A future warning in cargo-audit's own
dependency tree would fail this job for reasons unrelated to the
audit. Override RUSTFLAGS to empty at the job level so strict warnings
only gate our own workspace builds (build-and-test, tpm-tests, clippy).
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.

No supply-chain CVE scanning of Cargo.lock

2 participants