File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 push :
55 branches : [ main ]
66 pull_request :
7- branches : [ main ]
7+ paths :
8+ - " .github/workflows/**/*.yml"
89 schedule :
910 # Run weekly
1011 - cron : ' 0 0 * * 0'
2829 persist-credentials : false
2930
3031 - name : Set up Rust
31- uses : actions-rust-lang/setup-rust-toolchain@v1
32-
32+ uses : actions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98
33+ - name : Install jq
34+ run : |
35+ sudo apt-get update
36+ sudo apt-get install -y jq
3337 - name : Install Zizmor
3438 run : |
3539 cargo install --locked zizmor
@@ -39,13 +43,22 @@ jobs:
3943 zizmor --format sarif .github/workflows/ > results.sarif
4044
4145 - name : Upload analysis results
42- uses : actions/upload-artifact@v7
46+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f
4347 with :
4448 name : zizmor-results
4549 path : results.sarif
4650 retention-days : 7
4751
4852 - name : Upload to code-scanning
49- uses : github/codeql-action/upload-sarif@v4
53+ uses : github/codeql-action/upload-sarif@89a39a4e59826350b863aa6b6252a07ad50cf83e
5054 with :
5155 sarif_file : results.sarif
56+
57+ - name : Fail on Findings
58+ run : |
59+ count="$(
60+ jq '([.runs[]? | (.results // [])[] | select(.level != "note")] | length) // 0' \
61+ results.sarif
62+ )"
63+ echo "Zizmor findings: $count"
64+ test "$count" -eq 0
You can’t perform that action at this time.
0 commit comments