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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semgrep identified an issue in your code:
actions/setup-go@v7uses a movable tag, so a repointedv7release could run attacker-controlled code in this CI job.More details about this
actions/setup-go@v7pulls thesetup-goaction by a movable tag, not a specific commit. If the owner ofactions/setup-goor anyone who gains control of that repository retagsv7to a different commit, this workflow will run the new code during the Set up Go step beforego installand the validation scripts execute.A plausible attack looks like this:
actions/setup-goand repoints thev7tag to a malicious commit.skills/**or this workflow triggers Validate Skills.uses: actions/setup-go@v7to the attacker-controlled commit and runs it on theubuntu-latestrunner.actions/checkout@v7step, inspect workflow data like${{ github.base_ref }}, and tamper with later commands such asgo install github.com/agent-ecosystem/skill-validator/...@latestor thevalidate-skills.shrun.Because the reference here is
@v7, the exact code that runs can change over time without any change in this repository.To resolve this comment:
✨ Commit fix suggestion
Replace the mutable action reference with a full 40-character commit SHA in the
usesline for this step.Change
uses: actions/setup-go@v7touses: actions/setup-go@<full-commit-sha> # v7.Use the commit SHA from the exact
actions/setup-gorelease you intend to keep using, not the version tag alone.For example, the final format should look like
uses: actions/setup-go@8f1526c3... # v7.Keep the version comment after the SHA so future updates are easier to review.
Pinning to a commit SHA prevents the action owner from silently moving
v7to different code later.💬 Ignore this finding
Reply with Semgrep commands to ignore this finding.
/fp <comment>for false positive/ar <comment>for acceptable risk/other <comment>for all other reasonsAlternatively, triage in Semgrep AppSec Platform to ignore the finding created by github-actions-mutable-action-tag.
🛟 Help? Slack #semgrep-help or go/semgrep-help.
Resolution Options:
/fp $reason(if security gap doesn’t exist)/ar $reason(if gap is valid but intentional; add mitigations/monitoring)/other $reason(e.g., test-only)You can view more details about this finding in the Semgrep AppSec Platform.