[Security] Pin GitHub Actions to a full-length commit SHA#44
Open
juliendoutre wants to merge 1 commit intomainfrom
Open
[Security] Pin GitHub Actions to a full-length commit SHA#44juliendoutre wants to merge 1 commit intomainfrom
juliendoutre wants to merge 1 commit intomainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
=======================================
Coverage 63.12% 63.12%
=======================================
Files 7 7
Lines 377 377
Branches 49 49
=======================================
Hits 238 238
Misses 101 101
Partials 38 38 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pin GitHub Actions to SHA hashes
This automated PR pins third-party GitHub Actions references from mutable tag versions (e.g.,
@v4) to their corresponding SHA hashes (e.g.,@abc123...). The original tag is preserved as a comment for readability. Your workflows will work exactly the same way. Internal actions (under theDataDogorganization) are not pinned.Read https://docs.github.com/en/actions/reference/security/secure-use#using-third-party-actions for more details and info on how to configure this for entire repos.
Why pin GitHub Actions?
Git tags are mutable: they can be moved to point to different commits at any time. A compromised or malicious action maintainer could update a tag to inject arbitrary code into your CI workflows (see the tj-actions incident). Pinning to SHA hashes ensures you always run the exact code you reviewed, protecting your repository from supply chain attacks such as the tj-actions incident.
What if something breaks?
If a pinned action doesn't work for your use case, you can push a commit directly to this branch to fix it. As a last resort, reach out to #sdlc-security on Slack.
Set up Dependabot or Renovate for automatic updates
Once actions are pinned to SHA hashes, you should configure Dependabot or Renovate to receive weekly update PRs when new versions are available.
In the case of Dependabot, create or update
.github/dependabot.yml:Dependabot will automatically propose PRs that update both the SHA hash and the version comment like in this example.
This PR was automatically generated by the GitHub Actions Pinning tool, owned by #sdlc-security.