Skip to content

Commit 21fcc1e

Browse files
authored
Add explicit permissions block to GitHub Actions workflows (#5151)
1 parent 36421bb commit 21fcc1e

17 files changed

+42
-0
lines changed

.github/workflows/all-checks.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ on:
2121
- "docs/**"
2222
- '**.md'
2323

24+
permissions:
25+
contents: read
26+
2427
jobs:
2528
unit-tests:
2629
strategy:

.github/workflows/auto-merge-prs.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99

1010
jobs:
1111
automerge:
12+
permissions:
13+
contents: write
14+
pull-requests: write
1215
runs-on: ubuntu-latest
1316
steps:
1417
- name: Checkout

.github/workflows/benchmark-performance.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ on:
1010
jobs:
1111

1212
benchmark:
13+
permissions:
14+
contents: write
1315
runs-on: ubuntu-latest
1416

1517
steps:

.github/workflows/check-release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
branches:
66
- main
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
check-version:
1013
runs-on: ubuntu-latest
@@ -37,6 +40,8 @@ jobs:
3740
uses: ./.github/workflows/all-checks.yml
3841

3942
build-publish:
43+
permissions:
44+
contents: write
4045
needs: [check-version, test-kedro]
4146
if: |
4247
always() &&

.github/workflows/detect-secrets.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313

1414
jobs:
1515
detect-secrets:
16+
permissions:
17+
contents: read
1618
runs-on: ${{ inputs.os }}
1719
steps:
1820
- name: Checkout code

.github/workflows/docs-language-linter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88

99
jobs:
1010
vale:
11+
permissions:
12+
contents: read
13+
pull-requests: write
1114
name: runner / vale
1215
runs-on: ubuntu-latest
1316
steps:

.github/workflows/docs-only-checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ on:
1818

1919
jobs:
2020
lint:
21+
permissions:
22+
contents: read
2123
strategy:
2224
matrix:
2325
os: [ ubuntu-latest ]

.github/workflows/e2e-tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ env:
1717

1818
jobs:
1919
e2e-tests:
20+
permissions:
21+
contents: read
2022
runs-on: ${{ inputs.os }}
2123
steps:
2224
- name: Checkout code

.github/workflows/label-community-issues.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
jobs:
99
label:
10+
permissions:
11+
issues: write
1012
runs-on: ubuntu-latest
1113
steps:
1214
- name: Check if issue author is a member of Kedro org

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ on:
1313

1414
jobs:
1515
lint:
16+
permissions:
17+
contents: read
1618
runs-on: ${{ inputs.os }}
1719
steps:
1820
- name: Checkout code

0 commit comments

Comments
 (0)