Skip to content

Commit 161f64a

Browse files
[Github][CI] Hashpin actions dependencies (#127011)
This patch has pins several actions dependencies in the premerge workflow and the Windows/Linux container build workflows to help improve security in the unlikely event that someone tries to pull off a supply chain security attack by modifying release asserts for these actions.
1 parent 83632c0 commit 161f64a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

Diff for: .github/workflows/build-ci-container-windows.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
container-filename: ${{ steps.vars.outputs.container-filename }}
2828
steps:
2929
- name: Checkout LLVM
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3131
with:
3232
sparse-checkout: .github/workflows/containers/github-action-ci-windows
3333
- name: Write Variables
@@ -46,7 +46,7 @@ jobs:
4646
run: |
4747
docker save ${{ steps.vars.outputs.container-name-tag }} > ${{ steps.vars.outputs.container-filename }}
4848
- name: Upload container image
49-
uses: actions/upload-artifact@v4
49+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
5050
with:
5151
name: container
5252
path: ${{ steps.vars.outputs.container-filename }}
@@ -63,7 +63,7 @@ jobs:
6363
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6464
steps:
6565
- name: Download container
66-
uses: actions/download-artifact@v4
66+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
6767
with:
6868
name: container
6969
- name: Push Container

Diff for: .github/workflows/build-ci-container.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: depot-ubuntu-22.04-arm-16
3333
steps:
3434
- name: Checkout LLVM
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3636
with:
3737
sparse-checkout: .github/workflows/containers/github-action-ci/
3838
# podman is not installed by default on the ARM64 images.
@@ -66,7 +66,7 @@ jobs:
6666
podman save ${{ steps.vars.outputs.container-name-agent-tag }} > ${{ steps.vars.outputs.container-agent-filename }}
6767
6868
- name: Upload container image
69-
uses: actions/upload-artifact@v4
69+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
7070
with:
7171
name: container-${{ matrix.arch }}
7272
path: "*.tar"
@@ -90,7 +90,7 @@ jobs:
9090
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9191
steps:
9292
- name: Download container
93-
uses: actions/download-artifact@v4
93+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
9494

9595
- name: Push Container
9696
run: |

Diff for: .github/workflows/premerge.yaml

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ jobs:
3333
runs-on: llvm-premerge-linux-runners
3434
steps:
3535
- name: Checkout LLVM
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3737
with:
3838
fetch-depth: 2
3939
- name: Setup ccache
40-
uses: hendrikmuhs/[email protected].14
40+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
4141
with:
4242
max-size: "2000M"
4343
- name: Build and Test
@@ -94,11 +94,11 @@ jobs:
9494
shell: bash
9595
steps:
9696
- name: Checkout LLVM
97-
uses: actions/checkout@v4
97+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
9898
with:
9999
fetch-depth: 2
100100
- name: Setup ccache
101-
uses: hendrikmuhs/[email protected].14
101+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
102102
with:
103103
variant: "sccache"
104104
max-size: "2000M"
@@ -153,11 +153,11 @@ jobs:
153153
(github.event_name != 'pull_request' || github.event.action != 'closed')
154154
steps:
155155
- name: Checkout LLVM
156-
uses: actions/checkout@v4
156+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
157157
with:
158158
fetch-depth: 2
159159
- name: Setup ccache
160-
uses: hendrikmuhs/[email protected].14
160+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
161161
with:
162162
max-size: "2000M"
163163
- name: Install Ninja

0 commit comments

Comments
 (0)