-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure Trusted Code Checkout in GitHub Actions Workflow #7034
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@UlisesGascon waiting for you to address the code review changes :) |
For what it's worth, I don't see any security risks with the current setup. If the PR SHA is available, it will be used; otherwise, The PR SHA can be trusted in this case, as it points to the SHA at the event triggering the workflow execute, meaning that there is no possibility for a race-condition. |
I agree here; the I'm neutral to the change, but I don't believe it is needed. |
+1 I just want to see if we can remove the warnings from the scorecard 🫤 |
I am starting to question the real value of the scorecard if it is dumb enough to not recognise false positives. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- for the sake of our scorecard 🤷
Lighthouse Results
|
* feat: Ensure Trusted Code Checkout in GitHub Actions Workflow * fix: update GitHub event name
Description
This pull request addresses a potential security issue in our GitHub Actions workflow by ensuring that the code being checked out is from a trusted source. The changes include:
Conditional Ref Checkout:
Git Checkout
step to conditionally use the pull request commit SHA (github.event.pull_request.head.sha
) only if the event is a pull request.github.ref
.Validation
No local validation was done. This is related to the OSSF Scorecard
Related Issues
See: #6979
Check List
npm run format
to ensure the code follows the style guide.npm run test
to check if all tests are passing.npx turbo build
to check if the website builds without errors.