Skip to content

Commit c05e0a4

Browse files
authored
Merge pull request #9227 from mbien/ci-permissions
CI: Declare workflow permissions
2 parents 216fe6a + 5b24f1b commit c05e0a4

5 files changed

Lines changed: 20 additions & 0 deletions

File tree

.github/workflows/dependency-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ on:
2222
# Allows you to run this workflow manually from the Actions tab in GitHub UI
2323
workflow_dispatch:
2424

25+
permissions:
26+
contents: read
27+
2528
# cancel other workflow run in the same head-base group if it exists
2629
concurrency:
2730
group: dep-checker-${{ github.head_ref || github.run_id }}-${{ github.base_ref }}

.github/workflows/main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ on:
4141
# keep in mind this will have ALL tests enabled
4242
workflow_dispatch:
4343

44+
# read access for repo checkout and cache restore action; jobs may request more where needed
45+
permissions:
46+
contents: read
47+
actions: read
48+
4449
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
4550
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
4651
concurrency:
@@ -134,6 +139,9 @@ jobs:
134139
name: Build Clusters on JDK ${{ matrix.java }}
135140
if: contains(github.event.pull_request.labels.*.name, 'ci:no-build') == false
136141
runs-on: ubuntu-latest
142+
# write access for cache
143+
permissions:
144+
actions: write
137145
timeout-minutes: 40
138146
strategy:
139147
matrix:

.github/workflows/native-binary-build-dlight.nativeexecution.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ on:
6161
# Allows you to run this workflow manually from the Actions tab in GitHub UI
6262
workflow_dispatch:
6363

64+
permissions:
65+
contents: read
66+
6467
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
6568
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
6669
concurrency:

.github/workflows/native-binary-build-launcher.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ on:
5050
# Allows you to run this workflow manually from the Actions tab in GitHub UI
5151
workflow_dispatch:
5252

53+
permissions:
54+
contents: read
55+
5356
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
5457
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
5558
concurrency:

.github/workflows/native-binary-build-lib.profiler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ on:
7070
# Allows you to run this workflow manually from the Actions tab in GitHub UI
7171
workflow_dispatch:
7272

73+
permissions:
74+
contents: read
75+
7376
# cancel other PR workflow run in the same head-base group if it exists (e.g. during PR syncs)
7477
# if this is not a PR run (no github.head_ref and github.base_ref defined), use an UID as group
7578
concurrency:

0 commit comments

Comments
 (0)