Skip to content

Pass git argument arrays to @actions/exec in pr-bot updateReviewers - #41524

Merged
shunping merged 1 commit into
masterfrom
codescan/ts-prbot-exec-args
Nov 23, 2026
Merged

shunping merged 1 commit into
masterfrom
codescan/ts-prbot-exec-args

Conversation

@derrickaw

Copy link
Copy Markdown
Collaborator

Note: this PR was auto-generated by tooling. Before moving it out of draft, the author has done a full review of the PR, specifically evaluating it on the following criteria:

  • The PR remediates confirmed, live Code Scanning finding(s) (CodeQL / zizmor) on master without altering intended public API or workflow semantics
  • The fix is minimal, idiomatic, and avoids suppressing alerts or masking underlying defects
  • Relevant unit tests, linters, and CI checks have been verified

If you have concerns with the PR or with the underlying methodology used to generate this, please comment below - they will be addressed by the author not the tooling :)

Summary

  • Resolves CodeQL js/shell-command-injection-from-environment (CWE-078 / CWE-088, Medium/Warning, alert #63) in scripts/ci/pr-bot/updateReviewers.ts.
  • Passes explicit string[] argument arrays to @actions/exec (exec.exec("git", [...])) in openPull rather than interpolating PATH_TO_CONFIG_FILE and branch names into single command strings.

Verification

  • Verified TypeScript compilation, formatting, and pr-bot unit tests in scripts/ci/pr-bot

@derrickaw

Copy link
Copy Markdown
Collaborator Author

/gemini review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📋 Review Summary

This PR refactors openPull in scripts/ci/pr-bot/updateReviewers.ts to pass argument arrays to @actions/exec instead of interpolating file paths and branch names into single command strings. The change cleanly resolves the CodeQL js/shell-command-injection-from-environment alert while preserving the existing git command behavior.

🔍 General Feedback

  • The argument arrays passed to exec.exec("git", [...]) match the original command invocations and follow @actions/exec best practices.

💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.

@github-actions github-actions Bot added the size/s S: 10-49 lines changed label Nov 20, 2026
@derrickaw derrickaw added ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review and removed ready-for-human Draft PR with all checks passing and all review comments resolved, ready for human review labels Nov 20, 2026
@derrickaw
derrickaw marked this pull request as ready for review November 21, 2026 02:39
@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @shunping added as fallback since no labels match configuration
Backup reviewer: Abacn (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

Note: If you would like to opt out of this review, comment assign to next reviewer.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@shunping shunping left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants