From e833d3ab608c4f7bb2a8f20deadde36a5cf7d4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cho=20Garc=C3=ADa?= Date: Mon, 19 Oct 2026 18:53:51 +0200 Subject: [PATCH] ci: least-privilege workflow token; pin actions to commit SHAs --- .github/workflows/ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2bc0781..7ea3f7c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,12 +5,16 @@ on: branches: [main] pull_request: +# Least privilege: jobs only read the repo. Elevate per job if one ever needs more. +permissions: + contents: read + jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: 20 cache: npm