Skip to content

Commit 52e3dad

Browse files
committed
CI: Audit a freshly-resolved Cargo.lock in addition to pinned locks
The checked-in Cargo-minimal.lock and Cargo-recent.lock are only as fresh as their last manual update, so advisories affecting versions that the resolver would pick right now can slip through between lock refreshes. Add a matrix leg that runs `cargo generate-lockfile` before auditing, giving us clean-slate coverage on every scheduled run. Co-Authored-By: HAL 9000 Signed-off-by: Elias Rohrer <dev@tnull.de>
1 parent 1880501 commit 52e3dad

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/audit.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,14 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
lockfile: [Cargo-minimal.lock, Cargo-recent.lock]
21+
lockfile: [Cargo.lock, Cargo-minimal.lock, Cargo-recent.lock]
2222
steps:
2323
- uses: actions/checkout@v4
24+
- name: Generate fresh Cargo.lock
25+
if: ${{ matrix.lockfile == 'Cargo.lock' }}
26+
run: cargo generate-lockfile
2427
- name: Use ${{ matrix.lockfile }}
28+
if: ${{ matrix.lockfile != 'Cargo.lock' }}
2529
run: cp ${{ matrix.lockfile }} Cargo.lock
2630
- uses: rustsec/audit-check@v2.0.0
2731
with:

0 commit comments

Comments
 (0)