Skip to content

Commit 83efe14

Browse files
authored
chore(ci): add explicit permissions: blocks to all workflows (#23977)
1 parent 4ca7128 commit 83efe14

13 files changed

Lines changed: 43 additions & 0 deletions

.github/workflows/analyse-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ on:
3333
concurrency:
3434
group: ${{ github.workflow}}-${{ github.ref }}
3535
cancel-in-progress: true
36+
permissions:
37+
contents: read
38+
3639
jobs:
3740
sonarqube:
3841
if: github.actor != 'dependabot[bot]'

.github/workflows/check-formatting.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ env:
55

66
on: [ pull_request ]
77

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

.github/workflows/deploy-instance.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1010
cancel-in-progress: true
1111

12+
permissions:
13+
contents: read
14+
checks: read # for t3chguy/wait-on-check-action
15+
pull-requests: write # for actions-cool/maintain-one-comment
16+
1217
jobs:
1318
deploy-instance:
1419
if: contains(github.event.pull_request.labels.*.name, 'deploy')

.github/workflows/destroy-instance.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1010
cancel-in-progress: true
1111

12+
permissions:
13+
contents: read
14+
pull-requests: write # for actions-cool/maintain-one-comment delete
15+
issues: read # for gh api issues/<n>/events
16+
1217
jobs:
1318
check-deploy-label:
1419
runs-on: ubuntu-latest

.github/workflows/generate-merge-boms.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ concurrency:
88
group: ${{ github.workflow}}-${{ github.ref }}
99
cancel-in-progress: true
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
create-boms:
1316
runs-on: ubuntu-latest

.github/workflows/performance-tests-compare.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,9 @@ on:
109109
type: string
110110
default: manual
111111

112+
permissions:
113+
contents: read
114+
112115
jobs:
113116
performance-tests:
114117
if: github.repository == 'dhis2/dhis2-core'

.github/workflows/performance-tests-scheduled.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
# Run at 1 AM UTC every day
1212
- cron: "0 1 * * *"
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
run-scheduled-tests:
1619
name: ${{ matrix.name }}

.github/workflows/performance-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ on:
8484
description: 'Slack webhook URL for failure notifications'
8585
required: false
8686

87+
permissions:
88+
contents: read
89+
8790
jobs:
8891
performance-tests:
8992
if: github.repository == 'dhis2/dhis2-core'

.github/workflows/run-api-analytics-tests-clickhouse.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ on:
2424
concurrency:
2525
group: ${{ github.workflow}}-${{ github.ref }}
2626
cancel-in-progress: true
27+
permissions:
28+
contents: read
29+
2730
jobs:
2831
api-analytics-test-clickhouse:
2932
env:

.github/workflows/run-api-analytics-tests-doris.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ on:
2626
concurrency:
2727
group: ${{ github.workflow}}-${{ github.ref }}
2828
cancel-in-progress: true
29+
permissions:
30+
contents: read
31+
2932
jobs:
3033
api-analytics-test-doris:
3134
env:

0 commit comments

Comments
 (0)