Skip to content

Commit b49ee29

Browse files
hyperpolymathclaude
andcommitted
feat(ci): adopt cargo-audit workflow for dependency vulnerability scan
Echidnabot just landed cargo-audit (commit f307fb0); echidna is the larger Rust workspace and arguably needs it more (113 prover backends each with their own crate-tree leaves). Adopt the same workflow verbatim — runs on push/PR + weekly Monday 06:00 UTC against RustSec. Pairs with the existing dependabot wiring; gives two independent paths from advisory → fix. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 3e90c49 commit b49ee29

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/cargo-audit.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# cargo-audit.yml — Dependency vulnerability scanning for Rust projects.
5+
# Runs cargo-audit against the RustSec advisory database.
6+
name: Cargo Audit
7+
8+
on:
9+
pull_request:
10+
branches: ['**']
11+
push:
12+
branches: [main, master]
13+
schedule:
14+
# Run weekly on Monday at 06:00 UTC to catch new advisories.
15+
- cron: '0 6 * * 1'
16+
17+
permissions:
18+
contents: read
19+
20+
jobs:
21+
audit:
22+
name: Dependency audit
23+
runs-on: ubuntu-latest
24+
if: hashFiles('Cargo.lock') != ''
25+
26+
steps:
27+
- name: Checkout repository
28+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
29+
30+
- name: Install Rust toolchain
31+
uses: dtolnay/rust-toolchain@4be9e76fd7c4901c61fb841f559994984270fce7 # stable
32+
33+
- name: Install cargo-audit
34+
run: cargo install cargo-audit --locked
35+
36+
- name: Run cargo audit
37+
run: cargo audit
38+
39+
- name: Write summary
40+
if: always()
41+
run: |
42+
echo "## Cargo Audit Results" >> "$GITHUB_STEP_SUMMARY"
43+
echo "" >> "$GITHUB_STEP_SUMMARY"
44+
cargo audit 2>&1 | tail -20 >> "$GITHUB_STEP_SUMMARY" || true

0 commit comments

Comments
 (0)