Skip to content

Commit e619cdd

Browse files
authored
ci(security): set workflows permission to read-all by default (#594)
The permissions should be assigned on every job and by default should always be read Closes #593 Signed-off-by: Jonathan Gonzalez V. <[email protected]>
1 parent 3d704c8 commit e619cdd

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ on:
99
branches-ignore:
1010
- 'gh-pages'
1111

12+
permissions: read-all
13+
1214
jobs:
1315
codespell:
1416
runs-on: ubuntu-latest

.github/workflows/release-pr.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ on:
88
branches:
99
- release/*-v*
1010

11-
permissions:
12-
pull-requests: write
11+
permissions: read-all
1312

1413
jobs:
1514
create-pull-request:
1615
runs-on: ubuntu-24.04
16+
permissions:
17+
pull-requests: write
1718
steps:
1819
- name: Checkout
1920
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/release-publish.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ on:
55
branches:
66
- main
77

8-
permissions:
9-
contents: write # Required for pushing the Helm charts to the gh-pages branch
10-
packages: write # Required for GHCR access
11-
id-token: write # Required for signing
8+
permissions: read-all
129

1310
jobs:
1411
release:
1512
runs-on: ubuntu-24.04
13+
permissions:
14+
contents: write # Required for pushing the Helm charts to the gh-pages branch
15+
packages: write # Required for GHCR access
16+
id-token: write # Required for signing
1617
steps:
1718
- name: Checkout
1819
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/tests-cluster-chainsaw.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches-ignore:
66
- 'gh-pages'
77

8+
permissions: read-all
9+
810
jobs:
911
test-list:
1012
runs-on: ubuntu-24.04

.github/workflows/tests-operator.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
branches-ignore:
66
- 'gh-pages'
77

8+
permissions: read-all
9+
810
jobs:
911
deploy_operator:
1012
name: Deploy the operator in cluster-wide mode

0 commit comments

Comments
 (0)