ci(action): harden header GitHub action#270
Merged
Merged
Conversation
This commit switches the actions/setup-go dependency to use a commit
hash pin instead of a (mutable) tag.
This is considered best practice, and the official docs[1] state:
Using the commit SHA of a released action version is the safest for stability and security.
[1]: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsuses
While these inputs are (likely) not attacker controlled, passing them via env vars ensures they are appropriately quoted / escaped.[1] This prevents command injection if a user of the action happens to be passing user-controlled inputs into the header action. [1]: https://docs.zizmor.sh/audits/#template-injection
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR hardens the header composite GitHub Action by removing a mutable tag reference in its action dependency tree and reducing the risk of untrusted input affecting the invoked CLI.
Changes:
- Pin
actions/setup-goto a specific commit SHA instead of thev6tag. - Pass
license-eyeCLI arguments via environment variables instead of direct${{ inputs.* }}interpolation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
wu-sheng
approved these changes
Apr 9, 2026
domodwyer
added a commit
to DataDog/libdd-rc
that referenced
this pull request
Apr 9, 2026
To pick up apache/skywalking-eyes#270 which internally pins actions/setup-go to a SHA hash
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.
Hi there!
We use this very handy GitHub action in our public GitHub repo (thank you!) and until now we've had to add an exception for an unpinned
actions/setup-goin our GitHub config to allow it to be used without a SHA pin.We don't actually use this
actions/setup-goaction ourselves - it's purely part of the dependency tree because of the import inapache/skywalking-eyes/header. Given the recent supply chain attacks (1, 2) exploiting 3rd party actions, we're hoping to remove all allow-list exceptions and require SHA pins for everything, unblocking us to enable "require all actions to be pinned" on our repo.This PR allows us (and likely others!) opt into this extra repo security by:
actions/setup-gousage to a specific SHA commit instead of a tagI realise
actions/setup-gois an official action and unlikely to be compromised, but adding the SHA pin doesn't require any tradeoffs for the increased certainty / security.ci(action): pin actions/setup-go dependency (f7388a4)
ci(action): harden license-eye cmd arg inputs (46ef8e0)