Skip to content

Commit 9380018

Browse files
tashianclaude
andcommitted
Add explicit permissions blocks, eliminate all zizmor ignores
Add top-level permissions: contents: read to ci.yml, goCI.yml, and sync-winget-fork.yml. Add security-events: write to code-scan.yml and the goCI codeql job (required by CodeQL). Remove redundant per-job permissions where they now inherit from the workflow level. This eliminates every excessive-permissions finding, allowing us to delete .github/zizmor.yml entirely — zero suppressed warnings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2daab44 commit 9380018

5 files changed

Lines changed: 18 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- opened
1212
- synchronize
1313

14+
permissions:
15+
contents: read
16+
1417
concurrency:
1518
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1619
cancel-in-progress: true
@@ -22,14 +25,10 @@ jobs:
2225

2326
zizmor:
2427
name: Scan GitHub workflows
25-
permissions:
26-
contents: read
2728
uses: ./.github/workflows/zizmor.yml
2829

2930
frizbee:
3031
name: Check action pinning
31-
permissions:
32-
contents: read
3332
uses: ./.github/workflows/frizbee.yml
3433

3534
lint-dummy-app: # NOTE(@azazeal): this check is here to verify that .golangci.yml is valid

.github/workflows/code-scan.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
type: boolean
77
default: true
88

9+
permissions:
10+
actions: read
11+
contents: read
12+
security-events: write
13+
914
jobs:
1015
codeql:
1116
if: inputs.run-codeql

.github/workflows/goCI.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
permissions:
2+
contents: read
3+
14
on:
25
workflow_call:
36
inputs:
@@ -120,6 +123,10 @@ jobs:
120123

121124
codeql:
122125
if: inputs.run-codeql
126+
permissions:
127+
actions: read
128+
contents: read
129+
security-events: write
123130
uses: ./.github/workflows/codeql-analysis.yml
124131
with:
125132
goprivate: ${{ inputs.goprivate }}
@@ -146,13 +153,9 @@ jobs:
146153
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
147154

148155
zizmor:
149-
permissions:
150-
contents: read
151156
uses: ./.github/workflows/zizmor.yml
152157

153158
frizbee:
154-
permissions:
155-
contents: read
156159
uses: ./.github/workflows/frizbee.yml
157160

158161
build:

.github/workflows/sync-winget-fork.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: '0 0 1 * *' # First day of each month at midnight UTC
66
workflow_dispatch: # Allow manual trigger
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
sync:
1013
runs-on: ubuntu-latest

.github/zizmor.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)