Skip to content

Commit f102c62

Browse files
authored
chore(ci): pin actions/{download,upload}-artifact to immutable SHAs (#14001)
security(ci): pin actions/{download,upload}-artifact to immutable SHAs Replace floating tag references (download-artifact@v4.1.7, upload-artifact@v4) with commit SHAs plus version comments, closing the supply-chain vector exploited in the tj-actions/changed-files 2025 incident, where a tag rewrite by a compromised maintainer propagates to every downstream workflow that still resolves the tag at run time. - actions/download-artifact -> 65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 - actions/upload-artifact -> ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 Both SHAs verified against upstream: gh api repos/actions/download-artifact/git/ref/tags/v4.1.7 gh api repos/actions/upload-artifact/git/ref/tags/v4.6.2 This is Phase 1 of a broader supply-chain hardening initiative motivated by the TanStack 2026-05-11 npm compromise; remaining phases (npm OIDC trusted publishing, optionalDependencies whitelist lint, ecosystem- benchmark PR isolation, etc.) land in follow-up PRs.
1 parent 07ab44c commit f102c62

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

.github/actions/artifact/download/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ runs:
1818
using: composite
1919
steps:
2020
- name: Download artifact from github
21-
uses: actions/download-artifact@v4.1.7
21+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
2222
if: ${{ !startsWith(runner.name, 'rspack') || inputs.force-use-github-only == 'true' }}
2323
with:
2424
name: ${{ inputs.name }}

.github/actions/artifact/upload/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
overwrite: true
2929

3030
- name: Upload artifact to github
31-
uses: actions/upload-artifact@v4
31+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
3232
with:
3333
name: ${{ inputs.name }}
3434
path: ${{ inputs.path }}

.github/workflows/bench-rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
9191
- name: Upload Valgrind temporary files
9292
if: ${{ always() }}
93-
uses: actions/upload-artifact@v4
93+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
9494
with:
9595
name: codspeed-valgrind-tmp-${{ inputs.target }}
9696
path: ${{ runner.temp }}/codspeed-valgrind-tmp

.github/workflows/preview-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
run: pnpm i
8080

8181
- name: Download artifacts
82-
uses: actions/download-artifact@v4.1.7
82+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
8383
with:
8484
path: artifacts
8585

.github/workflows/release-canary.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
run: pnpm i
9999

100100
- name: Download artifacts
101-
uses: actions/download-artifact@v4.1.7
101+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
102102
with:
103103
path: artifacts
104104
pattern: bindings-*

.github/workflows/release-debug.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
run: pnpm i
4848

4949
- name: Download artifacts
50-
uses: actions/download-artifact@v4.1.7
50+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
5151
with:
5252
path: artifacts
5353
pattern: bindings-*

.github/workflows/reusable-build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189

190190
- name: Upload Test Reporter
191191
if: always()
192-
uses: actions/upload-artifact@v4
192+
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
193193
with:
194194
name: rstest-event-reports-${{ inputs.target }}-node${{ matrix.node }}
195195
path: '*-report.txt'

.github/workflows/reusable-release-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ jobs:
9999
run: pnpm i
100100

101101
- name: Download artifacts
102-
uses: actions/download-artifact@v4.1.7
102+
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
103103
with:
104104
path: artifacts
105105
pattern: bindings-*

0 commit comments

Comments
 (0)