Skip to content

Commit 01365fb

Browse files
authored
feat: add zizmor workflow checks for GitHub Actions (#662)
## Description This PR adds a zizmor security scan to the CI pipeline to analyze new and existing GitHub Actions workflows under .github/workflows/. - Runs zizmor on PRs and fails the check when HIGH severity (or above) issues are found, so they can block merges. - Runs zizmor on main to produce security reporting (where applicable), keeping visibility into findings over time. - Intended to be added as a required status check so workflow-security regressions can’t land unnoticed. Reference: #642 (comment) / zizmor-action ## Type of Change - [ ] New module - [ ] New template - [ ] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [x] Other - CI / security tooling ## Testing & Validation - Validation via PR check - opened a test PR with a deliberately risky workflow and confirmed zizmor reports and blocks on HIGH findings ## Related Issues #642 (comment) / zizmor-action
1 parent ec57cb5 commit 01365fb

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)