From f584b9ecf5a83a67a777600202bff78727702786 Mon Sep 17 00:00:00 2001 From: Alb3e3 <74142887+Alb3e3@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:20:27 +0400 Subject: [PATCH] ci: add permissions block to restrict GITHUB_TOKEN scope Add `permissions: contents: read` at the workflow level to follow the least-privilege principle. Without an explicit permissions block, workflows run with the default token permissions which include write access to repository contents and other resources. --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d8de362a..7b0a83ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,8 @@ name: Test on: [ push, pull_request, workflow_dispatch ] + +permissions: + contents: read jobs: test: name: ${{ matrix.os }}, ${{ matrix.cmake_name }}