CI: Add permissions to GitHub Actions

This change locks down the permissions of the access token in GitHub Actions to
only allow reading the repository contents and nothing else.

see https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
This commit is contained in:
Tim Duesterhus 2021-10-16 18:10:26 +02:00 committed by Willy Tarreau
parent c5aa113d80
commit 89c9d0a169
8 changed files with 24 additions and 0 deletions

View File

@ -4,6 +4,9 @@ on:
schedule:
- cron: "0 0 * * 2"
permissions:
contents: read
jobs:
codespell:

View File

@ -5,6 +5,9 @@ on:
schedule:
- cron: "0 0 * * 3"
permissions:
contents: read
jobs:
h2spec:
name: h2spec

View File

@ -3,6 +3,9 @@ name: Contrib
on:
push:
permissions:
contents: read
jobs:
build:

View File

@ -9,6 +9,9 @@ on:
schedule:
- cron: "0 0 * * *"
permissions:
contents: read
jobs:
scan:
runs-on: ubuntu-latest

View File

@ -2,6 +2,9 @@ name: alpine/musl
on: [push]
permissions:
contents: read
jobs:
musl:
name: gcc

View File

@ -14,6 +14,9 @@ on:
schedule:
- cron: "0 0 * * 4"
permissions:
contents: read
jobs:
test:

View File

@ -11,6 +11,9 @@ name: VTest
on:
push:
permissions:
contents: read
jobs:
# The generate-matrix job generates the build matrix using JSON output
# generated by .github/matrix.py.

View File

@ -11,6 +11,9 @@ name: Windows
on:
push:
permissions:
contents: read
jobs:
msys2:
name: ${{ matrix.name }}