]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CI: Add `permissions` to GitHub Actions
authorTim Duesterhus <tim@bastelstu.be>
Sat, 16 Oct 2021 16:10:26 +0000 (18:10 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 18 Oct 2021 05:17:04 +0000 (07:17 +0200)
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

.github/workflows/codespell.yml
.github/workflows/compliance.yml
.github/workflows/contrib.yml
.github/workflows/coverity.yml
.github/workflows/musl.yml
.github/workflows/openssl-nodeprecated.yml
.github/workflows/vtest.yml
.github/workflows/windows.yml

index de49f43438f23125d59e286e797bdecb85cc4542..61edaeb9ed6bc4536f3fc17f2feeab5ea8cdf2de 100644 (file)
@@ -4,6 +4,9 @@ on:
   schedule:
     - cron: "0 0 * * 2"
 
+permissions:
+  contents: read
+
 jobs:
   codespell:
 
index 9f2bec28964aaac9ab76f8aa4412b3516e303fe4..fe6c2711e51ffbb8a03d76ef13a5e2b600c63cdb 100644 (file)
@@ -5,6 +5,9 @@ on:
   schedule:
     - cron: "0 0 * * 3"
 
+permissions:
+  contents: read
+
 jobs:
   h2spec:
     name: h2spec
index 53f6025ca1a927647afaf0e50fd72def109587ed..93387a458c4cbf724c360edd23d57f3d4d1b4e12 100644 (file)
@@ -3,6 +3,9 @@ name: Contrib
 on:
   push:
 
+permissions:
+  contents: read
+
 jobs:
   build:
 
index fd5a0e2d2e32d84f3979a010e46421632f29891c..b3dd5ec526ad011b549f374bb05f8e789e86bfb8 100644 (file)
@@ -9,6 +9,9 @@ on:
   schedule:
   - cron: "0 0 * * *"
 
+permissions:
+  contents: read
+
 jobs:
   scan:
     runs-on: ubuntu-latest
index 8f6922486c183c1cfecd3ea96cfc90b22470211f..19d82af7cf199245c847acffe08bd244a4f0d5fd 100644 (file)
@@ -2,6 +2,9 @@ name: alpine/musl
 
 on: [push]
 
+permissions:
+  contents: read
+
 jobs:
   musl:
       name: gcc
index 6833911e46b3db0774eb8754d27e065dafcf15a1..f6da38234e5a4816821e6340cd87f298e502ca8d 100644 (file)
@@ -14,6 +14,9 @@ on:
   schedule:
     - cron: "0 0 * * 4"
 
+permissions:
+  contents: read
+
 jobs:
   test:
 
index 1dc216eeb85ca79523b78bc0aed02b83f2660e47..4cdbdce5b45aff68663be118e2d1aa971c16cd0f 100644 (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.
index b5a198aff44e3fc0685edd2fcab0c51f52302865..42bb4e8c927ffd3e81796a35521f7e473f2f3e13 100644 (file)
@@ -11,6 +11,9 @@ name: Windows
 on:
   push:
 
+permissions:
+  contents: read
+
 jobs:
   msys2:
     name: ${{ matrix.name }}