Skip to content

Commit 2725487

Browse files
authored
Merge pull request #365 from per1234/github_token-permissions-config
Configure permissions of `GITHUB_TOKEN` in workflows
2 parents b171f54 + 2992f13 commit 2725487

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+216
-12
lines changed

.github/workflows/check-ci-sync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
jobs:
2828
check-sync:
2929
runs-on: ubuntu-latest
30+
permissions: {}
3031

3132
steps:
3233
- name: Checkout repository

.github/workflows/check-clang-format.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ on:
3939
jobs:
4040
validate:
4141
runs-on: ubuntu-latest
42+
permissions: {}
4243

4344
steps:
4445
- name: Checkout repository
@@ -60,6 +61,7 @@ jobs:
6061

6162
check-config:
6263
runs-on: ubuntu-latest
64+
permissions: {}
6365

6466
steps:
6567
- name: Checkout repository
@@ -136,6 +138,7 @@ jobs:
136138

137139
check-output:
138140
runs-on: ubuntu-latest
141+
permissions: {}
139142

140143
steps:
141144
- name: Checkout repository
@@ -195,6 +198,7 @@ jobs:
195198

196199
check-testdata:
197200
runs-on: ubuntu-latest
201+
permissions: {}
198202

199203
steps:
200204
- name: Checkout repository
@@ -211,6 +215,7 @@ jobs:
211215

212216
convert:
213217
runs-on: ubuntu-latest
218+
permissions: {}
214219

215220
steps:
216221
- name: Set environment variables

.github/workflows/check-community-health-sync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ on:
3333
jobs:
3434
check-sync:
3535
runs-on: ubuntu-latest
36+
permissions: {}
3637

3738
steps:
3839
- name: Checkout repository

.github/workflows/check-config-sync.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ on:
1919
jobs:
2020
check-sync:
2121
runs-on: ubuntu-latest
22+
permissions: {}
2223

2324
steps:
2425
- name: Checkout repository

.github/workflows/check-dependabot.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
jobs:
2222
validate:
2323
runs-on: ubuntu-latest
24+
permissions: {}
2425

2526
steps:
2627
- name: Checkout repository

.github/workflows/check-eslint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929
jobs:
3030
validate:
3131
runs-on: ubuntu-latest
32+
permissions: {}
3233

3334
steps:
3435
- name: Checkout repository

.github/workflows/check-files-task.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
outputs:
1919
result: ${{ steps.determination.outputs.result }}
20+
permissions: {}
2021
steps:
2122
- name: Determine if the rest of the workflow should run
2223
id: determination
@@ -40,6 +41,8 @@ jobs:
4041
needs: run-determination
4142
if: needs.run-determination.outputs.result == 'true'
4243
runs-on: ubuntu-latest
44+
permissions:
45+
contents: read
4346

4447
steps:
4548
- name: Checkout repository
@@ -58,6 +61,8 @@ jobs:
5861
needs: run-determination
5962
if: needs.run-determination.outputs.result == 'true'
6063
runs-on: ubuntu-latest
64+
permissions:
65+
contents: read
6166

6267
steps:
6368
- name: Checkout repository

.github/workflows/check-general-formatting-task.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
jobs:
1616
run-determination:
1717
runs-on: ubuntu-latest
18+
permissions: {}
1819
outputs:
1920
result: ${{ steps.determination.outputs.result }}
2021
steps:
@@ -40,6 +41,8 @@ jobs:
4041
needs: run-determination
4142
if: needs.run-determination.outputs.result == 'true'
4243
runs-on: ubuntu-latest
44+
permissions:
45+
contents: read
4346

4447
steps:
4548
- name: Set environment variables

.github/workflows/check-issue-templates.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ on:
2121
jobs:
2222
validate:
2323
runs-on: ubuntu-latest
24+
permissions: {}
2425

2526
steps:
2627
- name: Checkout repository

.github/workflows/check-javascript-task.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,10 @@ on:
2929
workflow_dispatch:
3030
repository_dispatch:
3131

32-
permissions:
33-
contents: read
34-
3532
jobs:
3633
run-determination:
3734
runs-on: ubuntu-latest
35+
permissions: {}
3836
outputs:
3937
result: ${{ steps.determination.outputs.result }}
4038
steps:
@@ -60,6 +58,8 @@ jobs:
6058
needs: run-determination
6159
if: needs.run-determination.outputs.result == 'true'
6260
runs-on: ubuntu-latest
61+
permissions:
62+
contents: read
6363

6464
steps:
6565
- name: Checkout repository

0 commit comments

Comments
 (0)