Skip to content

Commit 096e42b

Browse files
authored
Merge pull request #5335 from vvoland/5310-27.x
[27.x backport] gha: set permissions to read-only by default
2 parents 30c7951 + 54135b0 commit 096e42b

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)