Skip to content

Commit 2eb34e8

Browse files
committed
Add cargo audit workflow
1 parent 10cf02c commit 2eb34e8

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/cargo-audit.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Cargo Audit
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- '**/Cargo.toml'
8+
- '**/Cargo.lock'
9+
- '.github/workflows/cargo-audit.yml'
10+
pull_request:
11+
branches: [ main ]
12+
paths:
13+
- '**/Cargo.toml'
14+
- '**/Cargo.lock'
15+
- '.github/workflows/cargo-audit.yml'
16+
schedule:
17+
- cron: '0 0 * * *' # Run daily at midnight UTC
18+
19+
permissions:
20+
contents: read
21+
checks: write
22+
23+
jobs:
24+
cargo-audit:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- name: Harden Runner
28+
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
29+
with:
30+
egress-policy: audit
31+
32+
- name: Checkout repository
33+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
with:
35+
submodules: true
36+
37+
- name: Run cargo-audit
38+
uses: rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998 # v2.0.0
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)