ci: pin third-party actions to full commit SHAs and declare minimal workflow permissions (E00-S05-T01)

- actions/checkout pinned to 11bd71901bbe5b1630ceea73d27597364c9af683 (v4.2.2)
- actions/setup-node pinned to 1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a (v4.2.0)
- workflow-level permissions: contents: read (the pipeline only reads the repo)
- no floating @v4 tags remain anywhere in the workflow
This commit is contained in:
implementer
2026-08-30 06:29:43 +00:00
parent 13b1548df8
commit d0c3b6a83d
+26 -17
View File
@@ -5,6 +5,12 @@ on:
push: push:
branches: [main] branches: [main]
# Minimal workflow token: the pipeline only reads repository contents
# (checkout, frozen install, typecheck, lint, tests, build) — nothing writes
# back, so the token is scoped to contents: read (E00-S05-T01).
permissions:
contents: read
# E00-S05-T01 — CI quality baseline (required PR stages). # E00-S05-T01 — CI quality baseline (required PR stages).
# #
# Every pull request runs the required quality stages in order, each gated on # Every pull request runs the required quality stages in order, each gated on
@@ -23,9 +29,12 @@ on:
# compiled artifact # compiled artifact
# #
# The stage order, the `needs` chain and the tests/ coverage are locked in by # The stage order, the `needs` chain and the tests/ coverage are locked in by
# tests/ci-stages.test.mjs (architecture stage). Container/Compose smoke on # tests/ci-stages.test.mjs (architecture stage). Third-party actions
# main/release branches and the Docker Compose baseline stack (E00-S02) stay # (actions/checkout, actions/setup-node) are pinned to full commit SHAs — no
# out of scope for this stage list. # floating tags — and the workflow token is scoped to `contents: read`
# (E00-S05-T01 hardening). Container/Compose smoke on main/release branches
# and the Docker Compose baseline stack (E00-S02) stay out of scope for this
# stage list.
jobs: jobs:
# Stage 1 — frozen install (E00-S05-T01). Runs before every later stage: the # Stage 1 — frozen install (E00-S05-T01). Runs before every later stage: the
@@ -35,9 +44,9 @@ jobs:
name: Stage 1 — Frozen lockfile install (E00-S05-T01) name: Stage 1 — Frozen lockfile install (E00-S05-T01)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
@@ -53,9 +62,9 @@ jobs:
needs: frozen-install needs: frozen-install
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
@@ -74,9 +83,9 @@ jobs:
needs: typecheck needs: typecheck
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
@@ -97,9 +106,9 @@ jobs:
needs: formatting-lint needs: formatting-lint
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
@@ -132,9 +141,9 @@ jobs:
needs: unit needs: unit
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
@@ -187,9 +196,9 @@ jobs:
needs: architecture needs: architecture
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)
@@ -216,9 +225,9 @@ jobs:
needs: postgres-integration needs: postgres-integration
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Node.js 24 - name: Install Node.js 24
uses: actions/setup-node@v4 uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with: with:
node-version: '24' node-version: '24'
- name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager) - name: Enable pnpm (corepack, pinned to 11.23.0 via packageManager)