From e7ac57a23edc9140d81fab5f59d630cd42c26a3a Mon Sep 17 00:00:00 2001 From: Nitin Goyal Date: Tue, 17 Nov 2026 16:59:38 +0530 Subject: [PATCH] ci: restrict GITHUB_TOKEN permissions in workflows Resolves CodeQL actions/missing-workflow-permissions alerts #1 and #2. CI needs contents: read; the PR title check needs pull-requests: read (matching the reusable workflows' own job permissions). Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 3 +++ .github/workflows/semantic-pull-request.yml | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 289cd0f..6ef8452 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,9 @@ on: pull_request: branches: [ "main" ] +permissions: + contents: read + jobs: ci: uses: divmora/.github/.github/workflows/go-ci.yml@main diff --git a/.github/workflows/semantic-pull-request.yml b/.github/workflows/semantic-pull-request.yml index f8e12e6..dd120c9 100644 --- a/.github/workflows/semantic-pull-request.yml +++ b/.github/workflows/semantic-pull-request.yml @@ -7,6 +7,9 @@ on: - edited - synchronize +permissions: + pull-requests: read + jobs: validate: uses: divmora/.github/.github/workflows/semantic-pr.yml@main