Skip to content

Pin GitHub Action references to commit SHAs#481

Merged
thpierce merged 2 commits intomasterfrom
pin-github-actions-sha
Mar 18, 2026
Merged

Pin GitHub Action references to commit SHAs#481
thpierce merged 2 commits intomasterfrom
pin-github-actions-sha

Conversation

@thpierce
Copy link
Contributor

@thpierce thpierce commented Mar 18, 2026

Summary

Pin all GitHub Action references to full commit SHAs instead of mutable version tags to prevent supply chain attacks. This is a security best practice recommended by GitHub's security hardening guide.

Mutable version tags (e.g. @v2) can be moved to point to different commits, meaning a compromised upstream action could execute malicious code in our workflows. Pinning to commit SHAs ensures we always run the exact code we've reviewed.

Changes

Old Reference New Reference Hash Version
actions/cache@v3 actions/cache@6f8efc2 6f8efc29b200d32929f49075959781ed54ec270c v3.5.0
actions/checkout@v3 actions/checkout@f43a0e5 f43a0e5ff2bd294095638e18286ca9a3d1956744 v3.6.0
actions/create-release@v1 actions/create-release@0cb9c9b 0cb9c9b65d5d1901c1f53e5e66eaf4afd303e70e v1.1.4
actions/download-artifact@v4 actions/download-artifact@d3f86a1 d3f86a106a0bac45b974a628896c90dbdf5c8093 v4.3.0
actions/setup-java@v3 actions/setup-java@17f84c3 17f84c3641ba7b8f6deff6309fc4c864478f5d62 v3.14.1
actions/setup-python@v4 actions/setup-python@7f4fc3e 7f4fc3e22c37d6ff65e88745f38bd3157c663f7c v4.9.1
actions/upload-artifact@v4 actions/upload-artifact@ea165f8 ea165f8d65b6e75b540449e92b4886f43607fa02 v4.6.2
aws-actions/configure-aws-credentials@v4 aws-actions/configure-aws-credentials@7474bc4 7474bc4690e29a8392af63c5b98e7449536d5c3a v4.3.1
hashicorp/setup-terraform@v2 hashicorp/setup-terraform@633666f 633666f66e0061ca3b725c73b2ec20cd13a8fdd1 v2.0.3

Static Code Check

Added a static-code-checks job to UnitTesting.yaml that will fail PRs introducing mutable GitHub Action version references.

@thpierce thpierce requested a review from a team as a code owner March 18, 2026 17:00
@thpierce thpierce merged commit 386902b into master Mar 18, 2026
6 of 15 checks passed
@thpierce thpierce deleted the pin-github-actions-sha branch March 18, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant