Skip to content

Commit 72bdcca

Browse files
tashianclaude
andcommitted
Add zizmor and frizbee CI/CD security checks
Add two new reusable workflows alongside existing actionlint: - zizmor: scans workflows for security vulnerabilities (injection risks, secret exposure, unsafe ${{}} expansion) - frizbee: checks that all actions and container images are pinned to commit SHAs or image digests Both run unconditionally in goCI.yml (no opt-out flags) and in the workflows repo's own CI. Also pins previously unpinned references: - docker://rhysd/actionlint:latest → 1.7.11@sha256:digest - actions/cache@v5 → @sha (v5.0.3) in goTest.yml and codeql-analysis.yml Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 3ff6a7f commit 72bdcca

7 files changed

Lines changed: 56 additions & 4 deletions

File tree

.github/workflows/actionlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
steps:
1010
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1111
- name: Check workflow files
12-
uses: docker://rhysd/actionlint:latest
12+
uses: docker://rhysd/actionlint:1.7.11@sha256:6f03470d0152251d7f07f7c4dc019dbe7024c72cd952f839544c7798843efa8f
1313
with:
1414
args: -color

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ jobs:
2020
name: Lint GitHub workflows
2121
uses: ./.github/workflows/actionlint.yml
2222

23+
zizmor:
24+
name: Scan GitHub workflows
25+
uses: ./.github/workflows/zizmor.yml
26+
27+
frizbee:
28+
name: Check action pinning
29+
uses: ./.github/workflows/frizbee.yml
30+
2331
lint-dummy-app: # NOTE(@azazeal): this check is here to verify that .golangci.yml is valid
2432
name: Lint dummy app
2533
runs-on: ubuntu-latest

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
~/go/pkg/mod || true
7373
-
7474
name: Action Cache
75-
uses: actions/cache@v5
75+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
7676
with:
7777
path: |
7878
~/.cache/go-build

.github/workflows/frizbee.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Frizbee pinning check
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
frizbee:
7+
name: Check action pinning
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
steps:
12+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
13+
with:
14+
persist-credentials: false
15+
- name: Check pinning
16+
uses: stacklok/frizbee-action@c7009cdb455a69ae0dab0c37f296e0f545b4211c # v0.0.5
17+
with:
18+
action: check
19+
fail_on_unpinned: true

.github/workflows/goCI.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
steps:
9191
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9292
- name: Check workflow files
93-
uses: docker://rhysd/actionlint:latest
93+
uses: docker://rhysd/actionlint:1.7.11@sha256:6f03470d0152251d7f07f7c4dc019dbe7024c72cd952f839544c7798843efa8f
9494
with:
9595
args: -color
9696

@@ -145,6 +145,12 @@ jobs:
145145
PAT: ${{ secrets.PAT }}
146146
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
147147

148+
zizmor:
149+
uses: ./.github/workflows/zizmor.yml
150+
151+
frizbee:
152+
uses: ./.github/workflows/frizbee.yml
153+
148154
build:
149155
uses: ./.github/workflows/goBuild.yml
150156
if: inputs.run-build

.github/workflows/goTest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
~/go/pkg/mod || true
108108
-
109109
name: Action Cache
110-
uses: actions/cache@v5
110+
uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
111111
with:
112112
path: |
113113
~/.cache/go-build

.github/workflows/zizmor.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Zizmor security scan
2+
on:
3+
workflow_call:
4+
5+
jobs:
6+
zizmor:
7+
name: Scan GitHub workflows
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
steps:
12+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
13+
with:
14+
persist-credentials: false
15+
- name: Run zizmor
16+
uses: zizmorcore/zizmor-action@0dce2577a4760a2749d8cfb7a84b7d5585ebcb7d # v0.5.0
17+
with:
18+
min-severity: medium
19+
min-confidence: medium

0 commit comments

Comments
 (0)