Internal - Pin GitHub Actions to commit SHAs#472
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens CI/CD supply chain security by pinning third-party GitHub Actions to immutable commit SHAs instead of mutable version tags.
Changes:
- Updated
uses:references across workflows to use full commit SHAs (e.g.,actions/checkout@<sha>). - Pinned build, artifact, AWS auth, Docker, CodeQL, Azure login, and scanning actions to specific commits.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/release.yml | Pins all third-party actions used in release, publishing, signing, Docker build/push, and scanning jobs to immutable SHAs. |
| .github/workflows/push.yml | Pins all third-party actions used in push/build/test/smoke-test, Docker build/publish, and cache-cleanup jobs to immutable SHAs. |
| .github/workflows/lambda-test.yml | Pins checkout and Java setup actions to immutable SHAs for lambda test workflow. |
| .github/workflows/lambda-stage.yml | Pins checkout, Java setup, AWS credentials, and artifact upload actions to immutable SHAs for stage publish workflow. |
| .github/workflows/codeql.yml | Pins checkout, CodeQL init/analyze, Java setup, and Gradle setup actions to immutable SHAs. |
| .github/workflows/benchmark.yml | Pins checkout and Gradle build action to immutable SHAs for benchmark workflow. |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd |
There was a problem hiding this comment.
Suggested change
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
There was a problem hiding this comment.
Dependabot will help to bump the GHA version with the commented version number.
See solarwinds/apm-php#115
bbd6ed8 to
6b1b63a
Compare
6b1b63a to
60efab1
Compare
xuan-cao-swi
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Replace all mutable version tags (
@v6,@v7, etc.) with immutable commit SHA references across CI/CD workflows to mitigate supply chain attacks via tag rewriting.Motivation
GitHub Action version tags are mutable — a compromised upstream repository can rewrite a tag to point at a malicious commit. Pinning to full commit SHAs ensures the exact code that was audited is the code that runs in CI, regardless of future tag mutations.
What changed
All
uses:references in workflow files now point to specific commit SHAs instead of semver tags. The pinned SHAs correspond to the same versions previously referenced (e.g.,actions/checkout@v6→ its current HEAD SHA). No behavioral change is introduced.Actions pinned:
actions/checkout,actions/setup-java,actions/upload-artifact,gradle/gradle-build-action,gradle/actions/setup-gradle,aws-actions/configure-aws-credentials,docker/setup-qemu-action,docker/setup-buildx-action,docker/login-action,docker/build-push-action,docker/metadata-action,docker/scout-action,github/codeql-action,azure/login,reversinglabs/gh-action-rl-scanner-cloud-only.Trade-offs
Test services data