File tree Expand file tree Collapse file tree 1 file changed +17
-21
lines changed
Expand file tree Collapse file tree 1 file changed +17
-21
lines changed Original file line number Diff line number Diff line change 11name : Security Audit
22
33on :
4- pull_request :
4+ push :
55 paths :
66 - ' **/Cargo.toml'
77 - ' **/Cargo.lock'
8- merge_group :
9- push :
10- branches : [master]
8+ pull_request :
119 paths :
1210 - ' **/Cargo.toml'
1311 - ' **/Cargo.lock'
1412 schedule :
1513 # weekly
1614 - cron : ' 0 0 * * 0'
15+ workflow_dispatch :
1716
1817env :
1918 CARGO_TERM_COLOR : always
2019
2120permissions :
22- contents : read
23- security-events : write
24- issues : write
21+ contents : read
22+ security-events : write
23+ issues : write
2524
2625jobs :
2726 cargo-audit :
2827 name : RustSec Audit (vulnerabilities)
2928 runs-on : ubuntu-latest
3029 timeout-minutes : 15
30+
3131 steps :
3232 - name : Checkout code
33- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34-
35- - name : Install Rust toolchain
36- uses : dtolnay/rust-toolchain@stable
37-
38- - name : Cache cargo registry/index/target
39- uses : Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1
33+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
34+ - name : Install Rust toolchain and configure cache
35+ uses : actions-rust-lang/setup-rust-toolchain@v1.15.2
4036 with :
41- cache-on-failure : true
37+ toolchain : stable
38+ cache : true
4239
4340 - name : Install cargo-audit
4441 run : cargo install cargo-audit --locked
4542
46- - name : Run cargo audit (raw output — you will see this clearly)
47- run : cargo audit --deny warnings
48-
49- - name : Run cargo audit again for GitHub Security tab upload
50- uses : rustsec/audit-check@69366f33c96575abad1ee0dba8212ae3e3c0d700
43+ - name : Run cargo audit
44+ run : cargo audit --deny warnings
45+
46+ - name : Upload SARIF to GitHub Security tab
47+ uses : rustsec/audit-check@69366f33c96575abad1ee0dba8212993eecbe998
5148 with :
5249 token : ${{ secrets.GITHUB_TOKEN }}
5350 deny : warnings
54-
You can’t perform that action at this time.
0 commit comments