-
Notifications
You must be signed in to change notification settings - Fork 127
Add workflow permissions and a SHA argument to Integration Test Build #1369
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
Conversation
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.
Pull Request Overview
This PR enhances security for the Integration Tests workflow by adding explicit permissions and verifying the PR head SHA.
- Added a required
shainput to the workflow dispatch. - Introduced a
permissionsblock with least-privilege settings. - Added a “Check SHA” step to validate the provided SHA matches the PR head.
Comments suppressed due to low confidence (3)
.github/workflows/integration-tests.yml:9
- Input name is defined as
sha(lowercase) but later referenced as${{ github.event.inputs.SHA }}(uppercase). This mismatch means the check will always compare against an empty value—use${{ github.event.inputs.sha }}consistently.
sha:
.github/workflows/integration-tests.yml:31
- The
runblock mixes Bash syntax (backticks) with PowerShell commands (Write-Output,if ($...)). Specifyshell: bashor convert fully to PowerShell to ensure commands execute correctly.
- name: Check SHA
.github/workflows/integration-tests.yml:33
- [nitpick] Rather than invoking
git rev-parse, consider using${{ github.event.inputs.sha }}orgithub.event.pull_request.head.shadirectly from the GitHub context to simplify the workflow.
prsha=`git rev-parse origin/pull/${{ github.event.inputs.pr_number }}/head | awk '{ print $1 }'`
Unit Test Results 1 files 1 suites 21s ⏱️ Results for commit d410a25. ♻️ This comment has been updated with latest results. |
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.
Changes look good! Thanks for adding SHA validations for enhanced security when running our integration tests!
To improve the security of the
Integration Testsbuild I added explicit workflow permissions, and I required the person who queues it to specify the SHA of the PR in addition to the PR number.ThirdPartyNotices.txt(if applicable)