Skip to content

Commit c9aefe1

Browse files
[Github][libc] Hash Pin Actions in Workflows (#129487)
This patch has pins actions in the libc Github workflows. Hash pinning is a best practice as it ensures we are getting an exact action version, which can help with reproducibility/reliability. It additionally alleviates security concerns as an attacker can modify release assets, potentially giving them access to tokens in privileged workflows.
1 parent 705decc commit c9aefe1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# - c_compiler: gcc
3131
# cpp_compiler: g++
3232
steps:
33-
- uses: actions/checkout@v4
33+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
3434

3535
# Libc's build is relatively small comparing with other components of LLVM.
3636
# A fresh fullbuild takes about 190MiB of uncompressed disk space, which can
@@ -39,7 +39,7 @@ jobs:
3939
# Do not use direct GHAC access even though it is supported by sccache. GHAC rejects
4040
# frequent small object writes.
4141
- name: Setup ccache
42-
uses: hendrikmuhs/[email protected]
42+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
4343
with:
4444
max-size: 1G
4545
key: libc_fullbuild_${{ matrix.c_compiler }}

.github/workflows/libc-overlay-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
cpp_compiler: clang++
4848

4949
steps:
50-
- uses: actions/checkout@v4
50+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
5151

5252
# Libc's build is relatively small comparing with other components of LLVM.
5353
# A fresh linux overlay takes about 180MiB of uncompressed disk space, which can
@@ -57,7 +57,7 @@ jobs:
5757
# Do not use direct GHAC access even though it is supported by sccache. GHAC rejects
5858
# frequent small object writes.
5959
- name: Setup ccache
60-
uses: hendrikmuhs/ccache-action@v1
60+
uses: hendrikmuhs/ccache-action@a1209f81afb8c005c13b4296c32e363431bffea5 # v1.2.17
6161
with:
6262
max-size: 1G
6363
key: libc_overlay_build_${{ matrix.os }}_${{ matrix.compiler.c_compiler }}

0 commit comments

Comments
 (0)