Skip to content

Commit 55b803a

Browse files
flavorjonesclaude
andcommitted
ci: ensure all permissions are scoped to job-level
Move workflow-level permissions to permissions: {} in scorecard and test workflows, adding explicit job-level permissions for each job. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e943797 commit 55b803a

2 files changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/scorecard.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ on:
77
- cron: '30 1 * * 6'
88
workflow_dispatch:
99

10-
permissions: read-all
10+
permissions: {}
1111

1212
jobs:
1313
analysis:
1414
runs-on: ubuntu-latest
1515
permissions:
16+
actions: read
1617
security-events: write
1718
id-token: write
1819
contents: read

.github/workflows/test.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,13 @@ on:
77
branches: [master]
88
workflow_call:
99

10-
permissions:
11-
contents: read
10+
permissions: {}
1211

1312
jobs:
1413
test:
1514
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
1617
steps:
1718
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1819
with:
@@ -40,6 +41,8 @@ jobs:
4041

4142
lint:
4243
runs-on: ubuntu-latest
44+
permissions:
45+
contents: read
4346
steps:
4447
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4548
with:
@@ -63,6 +66,8 @@ jobs:
6366

6467
security:
6568
runs-on: ubuntu-latest
69+
permissions:
70+
contents: read
6671
steps:
6772
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6873
with:
@@ -81,6 +86,8 @@ jobs:
8186
lint-actions:
8287
name: GitHub Actions audit
8388
runs-on: ubuntu-latest
89+
permissions:
90+
contents: read
8491
steps:
8592
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8693
with:
@@ -96,6 +103,8 @@ jobs:
96103

97104
race-check:
98105
runs-on: ubuntu-latest
106+
permissions:
107+
contents: read
99108
steps:
100109
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
101110
with:

0 commit comments

Comments
 (0)