Skip to content

Commit e990802

Browse files
Add zizmor to permissions allowlist
- Add zizmor to permissions allowlist. - Fix workflow error. Signed-off-by: martincostello <[email protected]>
1 parent 4057678 commit e990802

File tree

4 files changed

+13
-5
lines changed

4 files changed

+13
-5
lines changed

.github/workflows/slsa-goreleaser.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ on:
77

88
permissions: read-all
99

10-
env:
11-
GO_VERSION: 1.24
12-
1310
jobs:
1411
# Generate ldflags dynamically.
1512
args:
@@ -34,7 +31,7 @@ jobs:
3431
needs: args
3532
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] #7f4fdb871876c23e455853d694197440c5a91506
3633
with:
37-
go-version: ${{ env.GO_VERSION }}
34+
go-version: '1.24'
3835
evaluated-envs: "VERSION_LDFLAGS:${{needs.args.outputs.ldflags}}"
3936

4037
verification:

checks/permissions_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ func TestGithubTokenPermissions(t *testing.T) {
352352
Score: checker.MaxResultScore,
353353
NumberOfWarn: 0,
354354
NumberOfInfo: 2, // This is constant.
355-
NumberOfDebug: 8, // This is 4 + (number of actions)
355+
NumberOfDebug: 9, // This is 4 + (number of actions)
356356
},
357357
},
358358
{

checks/raw/permissions.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,10 @@ func isAllowedWorkflow(workflow *actionlint.Workflow, fp string, pdata *permissi
379379
// Code scanning with HLint uploads a SARIF file to GitHub.
380380
// https://github.com/haskell-actions/hlint-scan
381381
"haskell-actions/hlint-scan": true,
382+
383+
// Code scanning with zizmor uploads a SARIF file to GitHub.
384+
// https://github.com/zizmorcore/zizmor-action
385+
"zizmorcore/zizmor-action": true,
382386
}
383387

384388
tokenPermissions := checker.TokenPermission{

checks/testdata/.github/workflows/github-workflow-permissions-secevent-known-actions.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,10 @@ jobs:
4646
security-events: write
4747
steps:
4848
- uses: haskell-actions/hlint-scan@v1
49+
50+
zizmorcore-zizmor:
51+
runs-on: ubuntu-latest
52+
permissions:
53+
security-events: write
54+
steps:
55+
- uses: zizmorcore/[email protected]

0 commit comments

Comments
 (0)