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:
naveen
2022-06-28 14:00:44 +02:00
committed by Vadim Zeitlin
parent d5ed77da53
commit 64add326f6
7 changed files with 21 additions and 0 deletions
+3
View File
@@ -45,6 +45,9 @@ on:
- '*.yml'
- 'wxwidgets.props'
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.runner }}
+3
View File
@@ -63,6 +63,9 @@ on:
- '*.yml'
- 'wxwidgets.props'
permissions:
contents: read
jobs:
build-and-test:
defaults:
+3
View File
@@ -63,6 +63,9 @@ on:
- '*.yml'
- 'wxwidgets.props'
permissions:
contents: read
jobs:
build-and-test:
defaults:
+3
View File
@@ -45,6 +45,9 @@ on:
- '*.md'
- '*.yml'
permissions:
contents: read
jobs:
msw-msvs:
runs-on: windows-${{ matrix.vsversion }}
+3
View File
@@ -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
View File
@@ -9,6 +9,9 @@ on:
branches:
- master
permissions:
contents: read
jobs:
check-unix:
runs-on: ubuntu-20.04
+3
View File
@@ -18,6 +18,9 @@ on:
workflow_dispatch:
permissions:
contents: read
jobs:
update:
runs-on: ubuntu-20.04