security: add cargo-audit supply-chain scanning in CI (Plan 00)#81
Open
tyvsmith wants to merge 2 commits into
Open
security: add cargo-audit supply-chain scanning in CI (Plan 00)#81tyvsmith wants to merge 2 commits into
tyvsmith wants to merge 2 commits into
Conversation
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>
Contributor
There was a problem hiding this comment.
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 runscargo audit --deny unmaintained --deny unsoundagainst the lockfile. - Adds
just audit(and folds it intojust check) plus contributor documentation for the audit workflow. - Introduces
.cargo/audit.tomlignore policy with per-advisory justifications and updatesCargo.lockto 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 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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
cargo-auditin.github/workflows/ci.ymlrunscargo audit --deny unmaintained --deny unsound(vulnerabilities are denied by default), so any un-ignored advisory fails CI.just auditmirrors the CI command locally and is folded intojust check..cargo/audit.tomlholds the ignore policy — every entry carries an inline justification, nothing is blanket-ignored.Cargo.lock(anyhow, memmap2, quinn-proto, rand, rustls-webpki/rustls). The 2 remaining (quick-xml DoS) are unfixable viacargo 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 warningsgreen.just auditruns 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.Contract docs
No
docs/contracts.md/docs/security.mdchange (CI tooling only).CONTRIBUTING.mddocuments the audit workflow.Closes #60
🤖 Generated with Claude Code