Skip to content

Commit 8cffde0

Browse files
committed
feat: add zizmor workflow checks for GitHub Actions
1 parent 44a8c66 commit 8cffde0

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.github/workflows/zizmor.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: GitHub Actions Security Analysis (zizmor)
2+
3+
on:
4+
pull_request:
5+
branches: ["**"]
6+
paths:
7+
- ".github/workflows/**"
8+
push:
9+
branches: ["main"]
10+
paths:
11+
- ".github/workflows/**"
12+
workflow_dispatch:
13+
14+
permissions: {}
15+
16+
jobs:
17+
zizmor_pr_blocking:
18+
if: github.event_name == 'pull_request'
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
actions: read
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
26+
with:
27+
persist-credentials: false
28+
29+
- name: Run zizmor (blocking, HIGH only)
30+
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
31+
with:
32+
advanced-security: false
33+
annotations: true
34+
min-severity: high
35+
inputs: |
36+
.github/workflows
37+
38+
zizmor_main_sarif:
39+
if: github.event_name != 'pull_request'
40+
runs-on: ubuntu-latest
41+
permissions:
42+
security-events: write
43+
contents: read
44+
actions: read
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
48+
with:
49+
persist-credentials: false
50+
51+
- name: Run zizmor (SARIF)
52+
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
53+
with:
54+
inputs: |
55+
.github/workflows

0 commit comments

Comments
 (0)