Skip to content

Commit a0cdb84

Browse files
jon8787claude
andcommitted
add centralised zizmor SHA pinning audit workflow
Adds a manually-triggered workflow that scans all UnifiedID2 repos for unpinned external GitHub Actions references using zizmor. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent aa84a60 commit a0cdb84

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Zizmor SHA Pinning Audit
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
zizmor:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
12+
steps:
13+
- name: Checkout uid2-shared-actions
14+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
15+
16+
- name: Install zizmor
17+
run: pip install zizmor
18+
19+
- name: Get all uid2 repos
20+
id: repos
21+
env:
22+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
run: |
24+
# zizmor accepts owner/repo slugs as inputs but doesn't support org-level wildcards,
25+
# so we dynamically build the list of all repos in the org
26+
27+
repos=$(gh repo list UnifiedID2 --json name --no-limit -q '.[] | "UnifiedID2/" + .name' | tr '\n' ' ')
28+
echo "repos=$repos" >> $GITHUB_OUTPUT
29+
30+
- name: Run zizmor
31+
env:
32+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
run: |
34+
zizmor --config .github/zizmor.yml --min-severity high \
35+
${{ steps.repos.outputs.repos }}

.github/zizmor.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
rules:
2+
unpinned-uses:
3+
config:
4+
policies:
5+
"UnifiedID2/*": ref-pin # internal org, tag pinning is acceptable
6+
"*": hash-pin # all external actions must be SHA-pinned

0 commit comments

Comments
 (0)