Skip to content

Commit 7177d9d

Browse files
committed
ci: pin action versions to immutable commit SHAs (CodeRabbit on PR #14)
Replace @v4 / @v5 tag refs with the matching commit SHAs on actions/checkout and actions/setup-python. Tags are mutable — a compromised maintainer can repoint them, silently swapping the code that runs in our CI runner. SHAs are immutable and remove that class of supply-chain risk. Verified each SHA against the live tag on github.com: gh api repos/actions/checkout/git/ref/tags/v4 \ --jq '.object.sha' # 34e114876b0b11c390a56381ad16ebd13914f8d5 gh api repos/actions/setup-python/git/ref/tags/v5 \ --jq '.object.sha' # a26af69be951a213d495a4c3e4e4022e16d87065 The trailing `# v4` / `# v5` comments preserve the major-version intent so future bumps stay deliberate. The leading comment block documents the bump procedure for the next person.
1 parent fec00ae commit 7177d9d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

.github/workflows/tests.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v4
14+
# Pinned to immutable commit SHAs (not @v4 / @v5) so a compromised tag
15+
# cannot silently swap the underlying action code on this CI runner.
16+
# When bumping, verify the new SHA via:
17+
# gh api repos/actions/<name>/git/ref/tags/<vN> --jq '.object.sha'
18+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
1519

1620
- name: Set up Python
17-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
1822
with:
1923
python-version: '3.12'
2024

0 commit comments

Comments
 (0)