security(ci): pin GHA using immutable digests instead of mutable versions#705
Open
mvanhorn wants to merge 1 commit into
Open
security(ci): pin GHA using immutable digests instead of mutable versions#705mvanhorn wants to merge 1 commit into
mvanhorn wants to merge 1 commit into
Conversation
Pin every third-party `uses:` reference across all workflow files and the composite action to its full 40-character commit SHA, with the human-readable version tag preserved as a trailing comment so Renovate and Dependabot can keep them current. Mutable version tags can be repointed by an upstream maintainer or a compromised account, so pinning to immutable digests closes that supply-chain vector. The first-party OWASP/cve-lite-cli@v1 self-reference in self-scan.yml is intentionally left on its major tag. Refs OWASP#597
Collaborator
|
Hi @mvanhorn - the PR looks good, just needs a rebase onto the current main before we can merge. Could you run |
4 tasks
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.
Summary
Pin every third-party GitHub Actions
uses:reference across the workflow files and the compositeaction.ymlto its full 40-character commit SHA, with the human-readable version tag preserved as a trailing comment so Renovate and Dependabot can keep them current.Why this change
Referencing actions by mutable version tags (e.g.
actions/setup-node@v6,github/codeql-action/init@v4) is a supply-chain risk: a tag can be silently repointed by an upstream maintainer or a compromised account, changing the code that runs in CI without any visible diff here. Pinning to immutable commit digests closes that vector. For a security-scanning tool this also hardens the project against the exact class of issue it helps users detect. Requested in #597 and acknowledged by the maintainer.What changed
# vX.Y.Ztag comment:actions/checkout→df4cb1c(v6.0.3),actions/setup-node→48b55a0(v6.4.0),actions/upload-pages-artifact→fc324d3(v5.0.0),actions/deploy-pages→cd2ce8f(v5.0.0),actions/attest-build-provenance→e8998f9(v2.4.0),github/codeql-action/{init,autobuild,analyze,upload-sarif}→8aad20d(v4.36.2).ci.yml,codeql.yml,docs-site.yml,release.yml,self-scan.yml, andaction.yml.OWASP/cve-lite-cli@v1self-reference inself-scan.ymlon its major tag (intentional, tracks the major release line).Validation
repos/<action>/git/ref/tags/<tag>, dereferencing annotated tags to the underlying commit) and cross-checked against the precise semver tag pointing at that commit; the trailing comment reflects that exact version.grep -rE "uses: .+@v[0-9]" .github/ action.ymlnow returns only the intentionally-unpinned first-party self-reference; no third-party mutable tags remain.User-facing impact
Does this change:
CI/build configuration only; no runtime or scanning behavior change.
Notes
Closes #597.