Skip to content

Commit 54135b0

Browse files
thaJeztahvvoland
authored andcommitted
gha: set permissions to read-only by default
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit e4d99b4) Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 9593373 commit 54135b0

File tree

6 files changed

+54
-0
lines changed

6 files changed

+54
-0
lines changed

.github/workflows/build.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: build
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
concurrency:
413
group: ${{ github.workflow }}-${{ github.ref }}
514
cancel-in-progress: true

.github/workflows/codeql.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: codeql
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
on:
413
push:
514
branches:

.github/workflows/e2e.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: e2e
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
concurrency:
413
group: ${{ github.workflow }}-${{ github.ref }}
514
cancel-in-progress: true

.github/workflows/test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: test
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
concurrency:
413
group: ${{ github.workflow }}-${{ github.ref }}
514
cancel-in-progress: true

.github/workflows/validate-pr.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: validate-pr
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
on:
413
pull_request:
514
types: [opened, edited, labeled, unlabeled]

.github/workflows/validate.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: validate
22

3+
# Default to 'contents: read', which grants actions to read commits.
4+
#
5+
# If any permission is set, any permission not included in the list is
6+
# implicitly set to "none".
7+
#
8+
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
9+
permissions:
10+
contents: read
11+
312
concurrency:
413
group: ${{ github.workflow }}-${{ github.ref }}
514
cancel-in-progress: true

0 commit comments

Comments
 (0)