From d94fff24e8206872c59723bbbd2def8e7b053a48 Mon Sep 17 00:00:00 2001 From: Nicolas Antoniazzi Date: Thu, 19 Nov 2026 14:25:08 +0100 Subject: [PATCH 1/2] ci: pin GitHub Actions to commit SHAs A tag can be moved to point at other code if the action repository is compromised. Each action is pinned to the commit its tag points at today, so behavior is unchanged, with the version kept in a comment for Dependabot and readers. --- .github/workflows/check_build.yml | 12 ++++++------ .github/workflows/release.yml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/check_build.yml b/.github/workflows/check_build.yml index 4b1e25f..55eb93b 100644 --- a/.github/workflows/check_build.yml +++ b/.github/workflows/check_build.yml @@ -9,11 +9,11 @@ jobs: name: Lint commits runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: # we actually need "github.event.pull_request.commits + 1" commit fetch-depth: 0 - - uses: actions/setup-node@v6 + - uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 - run: npm ci - run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose check: @@ -22,11 +22,11 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 with: fetch-depth: 0 - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 with: node-version: 25.2.0 - name: Install dependencies @@ -35,10 +35,10 @@ jobs: run: npm run build - name: Generate release notes preview id: build-release-notes - uses: guilhermetod/semantic-release-notes-preview@v1.0.0 + uses: guilhermetod/semantic-release-notes-preview@015a2c1849e7703ee43e0350b04970ae3a76b49d # v1.0.0 - name: Comment release notes preview if: steps.build-release-notes.outputs.releaseNotes - uses: peter-evans/create-or-update-comment@v1 + uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae # v1.4.5 with: issue-number: ${{ github.event.number }} body: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4b021e7..ca70309 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,9 +15,9 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v5 + uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 - name: Setup Node.js - uses: actions/setup-node@v6 + uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 with: node-version: 25.2.0 - name: Install dependencies From e5abee4b8c226e7024d0fa33fec92a350c628ec7 Mon Sep 17 00:00:00 2001 From: Nicolas Antoniazzi Date: Thu, 19 Nov 2026 14:25:08 +0100 Subject: [PATCH 2/2] ci: do not persist the GitHub token in release checkouts semantic-release authenticates through the GITHUB_TOKEN env var, so the checkout does not need to leave the token in .git/config where dependency install scripts could read it. Install scripts stay enabled because native or prepare-time dependencies of this package need them. --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ca70309..259869f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0 + with: + persist-credentials: false - name: Setup Node.js uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0 with: