Skip to content

Conversation

julien-deramond
Copy link
Member

This PR suggests to use SHA-1 references instead of versions for third-party actions we rely on.

Source: https://docs.github.com/en/actions/how-tos/security-for-github-actions/security-guides/security-hardening-for-github-actions

Pin actions to a full length commit SHA

Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release. Pinning to a particular SHA helps mitigate the risk of a bad actor adding a backdoor to the action's repository, as they would need to generate a SHA-1 collision for a valid Git object payload. When selecting a SHA, you should verify it is from the action's repository and not a repository fork.

Please double-check that the sha-1 I've used are really the latest/correct versions in the upstream repositories. It's a bit long to do, but we'll do it only one time.

Indeed, Dependabot is apparently able to handle SHA-1 as well as you can see at https://github.com/twbs/bootstrap/pull/41594/files. I've added the corresponding versions in comment as I saw that Dependabot was able to update this comment as well :)

@julien-deramond julien-deramond added build github-actions Pull requests that update GitHub Actions code github_actions Pull requests that update GitHub Actions code labels Jul 15, 2025
@github-project-automation github-project-automation bot moved this to To do in v5.3.8 Jul 15, 2025
@julien-deramond julien-deramond moved this from To do to In progress in v5.3.8 Jul 15, 2025
@julien-deramond julien-deramond changed the title Workflows: Use SHA-1 precise references for third-party actions Workflows: Use SHA-1 for third-party actions Jul 15, 2025
@julien-deramond julien-deramond marked this pull request as ready for review July 15, 2025 18:29
@julien-deramond julien-deramond requested a review from mdo July 15, 2025 18:29
@julien-deramond julien-deramond moved this from In progress to Needs review in v5.3.8 Jul 15, 2025
@mdo mdo merged commit 117a248 into main Jul 16, 2025
14 of 15 checks passed
@mdo mdo deleted the main-jd-use-sha-1-for-3rd-party-actions branch July 16, 2025 16:11
@github-project-automation github-project-automation bot moved this from Needs review to Done in v5.3.8 Jul 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build github_actions Pull requests that update GitHub Actions code github-actions Pull requests that update GitHub Actions code
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants