Skip to content

Commit bbdcf16

Browse files
fix(ci): switch from cargo-audit to cargo-deny for advisory scanning
cargo-deny uses the actual dependency graph, eliminating false positives like RUSTSEC-2023-0071 (rsa via unused sqlx-mysql). Signed-off-by: Adrian Cole <adrian@tetrate.io>
1 parent 4dc1fbe commit bbdcf16

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/cargo-audit.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- '**/Cargo.toml'
99
- '**/Cargo.lock'
1010
# Run if the configuration file changes
11-
- '**/audit.toml'
11+
- 'deny.toml'
1212
# Rerun periodically to pick up new advisories
1313
schedule:
1414
- cron: '0 0 * * *'
@@ -20,13 +20,9 @@ jobs:
2020
runs-on: ubuntu-latest
2121
permissions:
2222
contents: read
23-
issues: write
2423
steps:
2524
- uses: actions/checkout@v4
26-
# https://github.com/marketplace/actions/cargo-audit-your-rust-dependencies
27-
- uses: actions-rust-lang/audit@72c09e02f132669d52284a3323acdb503cfc1a24
28-
name: Audit Rust Dependencies
25+
# https://github.com/EmbarkStudios/cargo-deny-action v2.0.15
26+
- uses: EmbarkStudios/cargo-deny-action@3fd3802e88374d3fe9159b834c7714ec57d6c979
2927
with:
30-
# sqlx-mysql pulls in rsa, but goose only uses sqlite. cargo-audit
31-
# can't distinguish used from unused deps (rustsec/rustsec#1119).
32-
ignore: RUSTSEC-2023-0071
28+
command: check advisories

deny.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[advisories]
2+
# Deny yanked crates to catch supply chain issues early.
3+
yanked = "deny"
4+
# Emulate cargo-audit which only checks vulnerabilities and yanked crates, not unmaintained/unsound.
5+
unmaintained = "none"
6+
unsound = "none"

0 commit comments

Comments
 (0)