You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of changes:
Mitigate potential script injection in the ai-pr-review.yml workflow by assigning github.event.pull_request.head.sha to an environment variable instead of interpolating it directly in a run: block.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR mitigates a potential script-injection vector in .github/workflows/ai-pr-review.yml by moving github.event.pull_request.head.sha from direct ${{ }} interpolation inside the run: shell into an env: variable (HEAD_SHA) and referencing it as $HEAD_SHA. This is the correct, recommended GitHub Actions pattern: the shell no longer evaluates untrusted expression-substituted text. The variable name is consistent between env: and the run: step, the value is properly quoted, and the echoed message semantics are unchanged. No correctness, typing, error-handling, or lifecycle issues were found. Residual test risk: GitHub Actions workflows are not unit-tested in this repo, so this defensive, no-functional-change hardening relies on review rather than automated verification; risk is minimal.
Reviewed commit 4c6579f92a99a543def7e37ad57049beab25c467. Workflow run
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
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.
Issue #, if available: N/A
Description of changes:
Mitigate potential script injection in the
ai-pr-review.ymlworkflow by assigninggithub.event.pull_request.head.shato an environment variable instead of interpolating it directly in arun:block.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.