dependabot / dependabot-core

🤖 Dependabot's core logic for creating update PR's.
https://docs.github.com/en/code-security/dependabot
MIT License
4.44k stars 915 forks source link

Pin actions in CI workflow to commit SHA #9755

Closed JamieMagee closed 2 weeks ago

JamieMagee commented 2 weeks ago

Recommended as part of GitHub's own GitHub Actions security hardening guide and the OSSF Scorecards checks

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.

jurre commented 2 weeks ago

Thanks Jamie! 👍