Pin full length commit SHA for 3rd party actions. #45
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.
Proposed changes
This implements the recommendation to pin full length commit SHAs instead of versions or branches when using 3rd-party GitHub Actions to protect from supply chain attacks.
This has been happening more often recently, with a number of popular actions having all of their tags updated with a buried vulnerability.
While the new notation is more verbose, a bit ugly, and requires every update to be applied manually, we can rely on Dependabot to handle that for us to make it more manageable.
No actual updates to actions are happening here. The latest versions correspond with the previous notation used.
Recent examples
Examples of actions being exploited in the wild:
Production
Development
Checklist
Further comments
GitHub is looking into providing immutable releases for actions (which would allow versions to be used again), and this is currently in the Q3 2025 roadmap. But we should use full SHA values until then.
See also newfold-labs/workflows#22.