From ae1a952ee4d2121e3c3aec98a43beef31dedcf68 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Thu, 3 Dec 2026 00:20:25 +0100 Subject: [PATCH] ci: limit the token permissions of the frontend build and Docker workflows (#35557) The frontend build workflow and two jobs in the Docker workflow ran with the repository's default token permissions, which GitHub code scanning flags. They now get read-only access, plus read access to the published images for the job that copies them to Docker Hub. Every job in both workflows now runs with explicitly set permissions. --- .github/workflows/docker.yaml | 5 +++++ .github/workflows/frontend.yaml | 3 +++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 9ff8f48cbc..4be26b7085 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -237,6 +237,8 @@ jobs: runs-on: ubuntu-latest needs: [merge] if: ${{ !cancelled() && needs.merge.result == 'success' && (github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/v')) }} + permissions: + contents: read steps: - name: Create Helm charts app token id: helm-app-token @@ -301,6 +303,9 @@ jobs: runs-on: ubuntu-latest if: ${{ !cancelled() && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')) }} needs: [merge] + permissions: + contents: read + packages: read strategy: fail-fast: false matrix: diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml index 6fd59f4b41..0bd6149742 100644 --- a/.github/workflows/frontend.yaml +++ b/.github/workflows/frontend.yaml @@ -4,6 +4,9 @@ # ───────────────────────────────────────────────────────────────────────────── name: Frontend Build +permissions: + contents: read + on: push: branches: [main, dev]