Skip to content

Commit aa11f5b

Browse files
Add GitHub Actions workflow for security analysis
1 parent 46cfe27 commit aa11f5b

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

.github/workflows/zizmor.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: GitHub Actions Security Analysis with zizmor 🌈
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["**"]
8+
9+
permissions: {}
10+
11+
jobs:
12+
zizmor:
13+
name: zizmor latest via PyPI
14+
runs-on: ubuntu-latest
15+
permissions:
16+
security-events: write
17+
contents: read
18+
actions: read
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
22+
with:
23+
persist-credentials: false
24+
25+
- name: Install the latest version of uv
26+
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
27+
28+
- name: Run zizmor 🌈
29+
run: |
30+
uvx zizmor --format=sarif . > results.sarif
31+
echo "SARIF file contents:"
32+
cat results.sarif
33+
env:
34+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Verify SARIF file exists
37+
run: |
38+
if [ ! -f results.sarif ]; then
39+
echo "Error: results.sarif was not created!"
40+
exit 1
41+
fi
42+
echo "SARIF file size: $(wc -c < results.sarif) bytes"
43+
44+
- name: Upload SARIF file
45+
uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
46+
with:
47+
sarif_file: results.sarif
48+
category: zizmor

0 commit comments

Comments
 (0)