From b0d669da587c42fa288de875b15975bf1360be06 Mon Sep 17 00:00:00 2001 From: Alb3e3 <74142887+Alb3e3@users.noreply.github.com> Date: Thu, 13 Aug 2026 21:11:30 +0400 Subject: [PATCH] ci: add permissions block and update actions/checkout to v4 - Add `permissions: contents: read` at workflow level to follow least-privilege principle - Update `actions/checkout` from v2 to v4 (v2 is deprecated) This reduces the default GITHUB_TOKEN scope and uses the current checkout action version. --- .github/workflows/CI.yml | 7 +++++-- .github/workflows/ci-fuzz.yml | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b06ab11d..3d22cbd9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -12,6 +12,9 @@ on: - '**.md' - 'LICENSE' +permissions: + contents: read + jobs: linux: runs-on: ubuntu-latest @@ -27,7 +30,7 @@ jobs: - GCC - CLANG steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: install build dependencies run: | sudo apt-get update @@ -73,7 +76,7 @@ jobs: - GCC - CLANG steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: build and test shell: bash run: | diff --git a/.github/workflows/ci-fuzz.yml b/.github/workflows/ci-fuzz.yml index 9e8be0bc..716855a9 100644 --- a/.github/workflows/ci-fuzz.yml +++ b/.github/workflows/ci-fuzz.yml @@ -1,5 +1,8 @@ name: CIFuzz on: [pull_request] + +permissions: + contents: read jobs: Fuzzing: runs-on: ubuntu-latest