浏览代码

GitHub Workflows security hardening (#4761)

* build: harden integration_tests.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

* build: harden image_builds.yml permissions

Signed-off-by: Alex <aleksandrosansan@gmail.com>

Signed-off-by: Alex <aleksandrosansan@gmail.com>
Co-authored-by: Niklas Meyer <62480600+DerLinkman@users.noreply.github.com>
Alex 2 年之前
父节点
当前提交
f28e18e676
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 3 0
      .github/workflows/image_builds.yml
  2. 3 0
      .github/workflows/integration_tests.yml

+ 3 - 0
.github/workflows/image_builds.yml

@@ -5,6 +5,9 @@ on:
     branches: [ "master", "staging" ]
   workflow_dispatch:
 
+permissions:
+  contents: read # to fetch code (actions/checkout)
+
 jobs:
   docker_image_builds:
     strategy:

+ 3 - 0
.github/workflows/integration_tests.yml

@@ -5,6 +5,9 @@ on:
     branches: [ "master", "staging" ]
   workflow_dispatch:
 
+permissions:
+  contents: read
+
 jobs:
   integration_tests:
     runs-on: ubuntu-latest