Skip to content

Commit cfe3264

Browse files
committed
first commit - add zizmor scan
0 parents  commit cfe3264

2 files changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/zizmor-scan.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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/

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# github-action-workflows-public
2+
3+
Org level workflows used in public repos

0 commit comments

Comments
 (0)