From 912a7ae59bae5ffdc7085a2e0ff0a66a5a729dd7 Mon Sep 17 00:00:00 2001 From: Dimitris Mostrous Date: Tue, 23 Jun 2026 13:30:00 +0100 Subject: [PATCH] Set least-privilege GITHUB_TOKEN permissions in workflows - rolling-release.yaml: workflow-level permissions {}; build jobs contents: read; release contents: write - build.yml: workflow-level permissions {}; build jobs contents: read --- .github/workflows/build.yml | 8 ++++++++ .github/workflows/rolling-release.yaml | 11 +++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4b621df..a2cf4d8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,9 +5,13 @@ on: branches: - "**" +permissions: {} + jobs: build-windows: runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -69,6 +73,8 @@ jobs: build-macos: runs-on: macos-latest + permissions: + contents: read steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -130,6 +136,8 @@ jobs: build-linux: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 diff --git a/.github/workflows/rolling-release.yaml b/.github/workflows/rolling-release.yaml index 5cdf778..1c4fe1d 100644 --- a/.github/workflows/rolling-release.yaml +++ b/.github/workflows/rolling-release.yaml @@ -12,12 +12,13 @@ on: required: true type: string -permissions: - contents: write +permissions: {} jobs: build-windows: runs-on: windows-latest + permissions: + contents: read steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -85,6 +86,8 @@ jobs: build-macos: runs-on: macos-latest + permissions: + contents: read steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -158,6 +161,8 @@ jobs: build-linux: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 @@ -241,6 +246,8 @@ jobs: release: needs: [build-windows, build-macos, build-linux] runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout Repository uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4