Skip to content

Commit 3235e4f

Browse files
committed
ci: SHA-pin all GitHub Actions in CI workflow
Replace mutable action refs with pinned commit SHAs, per the supply-chain requirements in the build-lockdown guidance (inc-18715). The material fix is `snyk/actions/node@master` -> a pinned v1.0.0 commit: a floating branch ref on a third-party action, executing with SNYK_TOKEN in scope. Anyone able to move that branch could run arbitrary code in CI with the token available. Also pinned, and bumped off the deprecated v2 majors: actions/checkout v2 -> v7.0.1 (3d3c42e) actions/setup-node v2 -> v7.0.0 (8207627) codecov/codecov-action v5 -> v5.5.5 (0fb7174), pinned at current major snyk/actions/node master -> v1.0.0 (9adf32b) Caveat: snyk/actions/node is a Docker-based action and still pulls the mutable `docker://snyk/snyk:node` image at runtime, so the SHA pin bounds the action code but not the scanner image. fql-ts is a public repo, so it runs on GitHub-hosted runners and is not subject to the locked-down agent egress wall; no Buildkite migration is needed here. See PR description.
1 parent d8d7c06 commit 3235e4f

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ jobs:
1111
node-version: [20.10.0]
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
1515

1616
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v2
17+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
1818
with:
1919
node-version: ${{ matrix.node-version }}
2020

2121
- name: Install Dependencies
2222
run: yarn install --frozen-lockfile
2323

2424
- name: Run Snyk to check for vulnerabilities
25-
uses: snyk/actions/node@master
25+
# Was `@master` — a mutable branch ref on a third-party action running
26+
# with SNYK_TOKEN in scope. Pinned to the v1.0.0 release commit.
27+
# NOTE: this action is Docker-based and still pulls the mutable
28+
# `docker://snyk/snyk:node` image at runtime, so the SHA pin bounds the
29+
# action code but not the scanner image.
30+
uses: snyk/actions/node@9adf32b1121593767fc3c057af55b55db032dc04 # v1.0.0
2631
env:
2732
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
2833
with:
@@ -35,7 +40,7 @@ jobs:
3540
run: yarn test --coverage
3641

3742
- name: Upload coverage reports to Codecov
38-
uses: codecov/codecov-action@v5
43+
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5.5.5
3944
with:
4045
token: ${{ secrets.CODECOV_TOKEN }}
4146
slug: segmentio/fql-ts

0 commit comments

Comments
 (0)