From 31215637235618f5f3072a61bd95a09ae567cfe0 Mon Sep 17 00:00:00 2001 From: Dean Grant <9986059+deangrant@users.noreply.github.com> Date: Sat, 15 Aug 2026 09:00:01 +0100 Subject: [PATCH] ci(github): Restrict workflow GITHUB_TOKEN to contents read Add explicit least-privilege permissions to the lint and test workflows so they no longer inherit the repository default token scope. This resolves CodeQL missing-workflow-permissions alerts without changing job behavior. * Declare `permissions: contents: read` on the lint workflow. * Declare `permissions: contents: read` on the test workflow. --- .github/workflows/lint.yml | 3 +++ .github/workflows/test.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 11f85bc..a12415f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -9,6 +9,9 @@ concurrency: group: lint-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: lint: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c100c4f..69c374c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,9 @@ concurrency: group: test-${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest