Summary
Code scanning (rule githubactions:S7637) flags softprops/action-gh-release@v2 in .github/workflows/publish.yml:81 — an external GitHub Action referenced by a mutable tag (@v2) instead of a pinned commit SHA.
Expected behavior
Third-party actions are pinned to a full commit SHA to prevent supply-chain tampering (a tag can be force-moved by the action owner).
Actual behavior
uses: softprops/action-gh-release@v2 resolves to whatever the tag points at when the workflow runs.
Suggested fix
- Resolve the current
v2 commit SHA of softprops/action-gh-release (e.g. git ls-remote https://github.com/softprops/action-gh-release refs/tags/v2).
- Pin the step to the SHA:
uses: softprops/action-gh-release@<full-sha> (optionally append # v2 as a comment for readability).
- Consider also pinning
actions/checkout@v4 and actions/setup-node@v4 for consistency (they were not flagged, but the same risk applies).
Environment
- Workflow:
.github/workflows/publish.yml, binaries job
Additional context
Source: GitHub code scanning alert #6. Severity: high.
Summary
Code scanning (rule
githubactions:S7637) flagssoftprops/action-gh-release@v2in.github/workflows/publish.yml:81— an external GitHub Action referenced by a mutable tag (@v2) instead of a pinned commit SHA.Expected behavior
Third-party actions are pinned to a full commit SHA to prevent supply-chain tampering (a tag can be force-moved by the action owner).
Actual behavior
uses: softprops/action-gh-release@v2resolves to whatever the tag points at when the workflow runs.Suggested fix
v2commit SHA ofsoftprops/action-gh-release(e.g.git ls-remote https://github.com/softprops/action-gh-release refs/tags/v2).uses: softprops/action-gh-release@<full-sha>(optionally append# v2as a comment for readability).actions/checkout@v4andactions/setup-node@v4for consistency (they were not flagged, but the same risk applies).Environment
.github/workflows/publish.yml,binariesjobAdditional context
Source: GitHub code scanning alert #6. Severity: high.