Skip to content

Commit c29e855

Browse files
committed
feat: Add cargo-audit to CI workflow
Signed-off-by: hashcatHitman <155700084+hashcatHitman@users.noreply.github.com>
1 parent 9dcfb8b commit c29e855

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ concurrency:
2020
env:
2121
CARGO_TERM_COLOR: always
2222
CARGO_VET_VERSION: 0.10.2
23+
CARGO_AUDIT_VERSION: 0.22.0
2324
MSRV: 1.89.0
2425

2526
defaults:
@@ -48,6 +49,27 @@ jobs:
4849
- name: Invoke cargo-vet
4950
run: cargo vet --locked
5051

52+
cargo-audit:
53+
name: Audit Dependencies
54+
runs-on: ubuntu-latest
55+
steps:
56+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
57+
with:
58+
persist-credentials: false
59+
- name: Install Rust
60+
run: rustup update stable && rustup default stable
61+
- name: Check cache for cargo-audit
62+
id: cache-cargo-audit
63+
uses: actions/cache@8b402f58fbc84540c8b491a91e594a4576fec3d7 # v5.0.2
64+
with:
65+
path: ~/.cargo/bin/cargo-audit
66+
key: cargo-audit-bin-${{ env.CARGO_AUDIT_VERSION }}
67+
- if: ${{ steps.cache-cargo-audit.outputs.cache-hit != 'true' }}
68+
name: Install cargo-audit
69+
run: cargo install --locked --version ${CARGO_AUDIT_VERSION} cargo-audit
70+
- name: Invoke cargo-audit
71+
run: cargo audit --deny warnings
72+
5173
quality-control:
5274
name: Quality Control
5375
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)