Skip to content

Commit 9f167e2

Browse files
committed
Merge external PR #1471: Add explicit permissions to CI workflow
2 parents a81428f + ed21eeb commit 9f167e2

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

.github/workflows/CI.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,15 @@ on:
1111
- cron: "0 7 * * *"
1212
workflow_dispatch:
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
build:
19+
permissions:
20+
contents: read
21+
actions: write
22+
security-events: write
1623
strategy:
1724
fail-fast: false
1825
matrix:
@@ -85,6 +92,9 @@ jobs:
8592
if: matrix.runner-os == 'ubuntu-latest'
8693

8794
upload-event-file:
95+
permissions:
96+
contents: read
97+
actions: write
8898
runs-on: ubuntu-latest
8999
steps:
90100
# This is used by the subsequent publish-test-results.yaml
@@ -95,6 +105,9 @@ jobs:
95105
path: ${{ github.event_path }}
96106

97107
build-for-e2e-test:
108+
permissions:
109+
contents: read
110+
actions: write
98111
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == 'github'
99112
strategy:
100113
fail-fast: false
@@ -140,6 +153,10 @@ jobs:
140153
dist/win-x64/gei-windows-amd64.exe
141154
142155
e2e-test:
156+
permissions:
157+
contents: read
158+
actions: write
159+
checks: write
143160
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.owner.login == 'github'
144161
needs: [build-for-e2e-test]
145162
permissions:
@@ -279,6 +296,8 @@ jobs:
279296
shell: pwsh
280297

281298
publish:
299+
permissions:
300+
contents: write
282301
runs-on: ubuntu-latest
283302
if: startsWith(github.ref, 'refs/tags/v')
284303
needs: [build, e2e-test]

0 commit comments

Comments
 (0)