Skip to content

Commit a2cc084

Browse files
committed
ci: add rustsec cargo-audit workflow
1 parent ec02dfe commit a2cc084

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/security.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Security
2+
3+
on:
4+
pull_request:
5+
merge_group:
6+
push:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
permissions: {}
13+
14+
jobs:
15+
supply-chain:
16+
name: Run `cargo-audit`
17+
runs-on: ubuntu-latest
18+
timeout-minutes: 30
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
22+
with:
23+
persist-credentials: false
24+
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@22a6a5b0f9f487c5f5587025ae9d4a1caf2a8a78 # clippy
27+
28+
- name: Rust cache
29+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2
30+
with:
31+
cache-on-failure: true
32+
33+
- name: Install latest cargo-audit from source
34+
run: cargo install cargo-audit --force --locked
35+
36+
- name: Check for audit warnings
37+
run: cargo audit -D warnings
38+
continue-on-error: true
39+
40+
- name: Check for vulnerabilities
41+
run: cargo audit

0 commit comments

Comments
 (0)