Skip to content

Commit

Permalink
Merge pull request #48297 from austinvazquez/cherry-pick-2b5ffa0b63c7…
Browse files Browse the repository at this point in the history
…6e8bb4ebb253d7e4db5c7af918c0-to-23.0

[23.0 backport] gha: set permissions to read-only by default
  • Loading branch information
thaJeztah authored Aug 8, 2024
2 parents 72d0c87 + da41730 commit ac6750e
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/.dco.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: .dco

# TODO: hide reusable workflow from the UI. Tracked in https://github.com/community/community/discussions/12025

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

on:
workflow_call:

Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/.windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,15 @@ name: .windows

# TODO: hide reusable workflow from the UI. Tracked in https://github.com/community/community/discussions/12025

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

on:
workflow_call:
inputs:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/buildkit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: buildkit

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: ci

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: test

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/windows-2019.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: windows-2019

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/windows-2022.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
name: windows-2022

# Default to 'contents: read', which grants actions to read commits.
#
# If any permission is set, any permission not included in the list is
# implicitly set to "none".
#
# see https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand Down

0 comments on commit ac6750e

Please sign in to comment.