File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Zizmor Workflow Security Scan
2+
3+ on :
4+ pull_request :
5+ merge_group :
6+
7+ permissions :
8+ contents : read
9+
10+ jobs :
11+ zizmor-scan :
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
16+ with :
17+ persist-credentials : false
18+ fetch-depth : 0
19+
20+ - name : Detect workflow changes
21+ id : changes
22+ env :
23+ BASE_SHA : ${{ github.event.pull_request.base.sha || github.event.merge_group.base_sha }}
24+ HEAD_SHA : ${{ github.event.pull_request.head.sha || github.event.merge_group.head_sha }}
25+ run : |
26+ if git diff --name-only "$BASE_SHA" "$HEAD_SHA" | grep -q '^\.github/workflows/'; then
27+ echo "workflows=true" >> "$GITHUB_OUTPUT"
28+ else
29+ echo "workflows=false" >> "$GITHUB_OUTPUT"
30+ fi
31+
32+ - name : Install zizmor
33+ if : steps.changes.outputs.workflows == 'true'
34+ run : pip install zizmor==1.25.2
35+
36+ - name : Scan workflows
37+ if : steps.changes.outputs.workflows == 'true'
38+ run : zizmor --min-severity=medium .github/workflows/
Original file line number Diff line number Diff line change 1+ # github-action-workflows-public
2+
3+ Org level workflows used in public repos
You can’t perform that action at this time.
0 commit comments