Restrict job permissions in GitHub actions workflows
Restrict the GitHub token permissions only to the required ones, i.e. just read-only access to the code. This is done in order to reduce the potential harm in case of a malicious pull request, see GitHub blog post at https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com> Closes #22574.
This commit is contained in:
parent
d5ed77da53
commit
64add326f6
3
.github/workflows/ci.yml
vendored
3
.github/workflows/ci.yml
vendored
@ -45,6 +45,9 @@ on:
|
||||
- '*.yml'
|
||||
- 'wxwidgets.props'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ${{ matrix.runner }}
|
||||
|
3
.github/workflows/ci_mac.yml
vendored
3
.github/workflows/ci_mac.yml
vendored
@ -63,6 +63,9 @@ on:
|
||||
- '*.yml'
|
||||
- 'wxwidgets.props'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
defaults:
|
||||
|
3
.github/workflows/ci_mac_xcode.yml
vendored
3
.github/workflows/ci_mac_xcode.yml
vendored
@ -63,6 +63,9 @@ on:
|
||||
- '*.yml'
|
||||
- 'wxwidgets.props'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
defaults:
|
||||
|
3
.github/workflows/ci_msw.yml
vendored
3
.github/workflows/ci_msw.yml
vendored
@ -45,6 +45,9 @@ on:
|
||||
- '*.md'
|
||||
- '*.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
msw-msvs:
|
||||
runs-on: windows-${{ matrix.vsversion }}
|
||||
|
3
.github/workflows/ci_msw_cross.yml
vendored
3
.github/workflows/ci_msw_cross.yml
vendored
@ -49,6 +49,9 @@ on:
|
||||
- '*.yml'
|
||||
- 'wxwidgets.props'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
msw-cross-build:
|
||||
# Set up this job to run in a Debian Sid container because it has recent
|
||||
|
3
.github/workflows/code_checks.yml
vendored
3
.github/workflows/code_checks.yml
vendored
@ -9,6 +9,9 @@ on:
|
||||
branches:
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-unix:
|
||||
runs-on: ubuntu-20.04
|
||||
|
3
.github/workflows/docs_update.yml
vendored
3
.github/workflows/docs_update.yml
vendored
@ -18,6 +18,9 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
update:
|
||||
runs-on: ubuntu-20.04
|
||||
|
Loading…
Reference in New Issue
Block a user