Skip to content

πŸ”’ Fix command injection vulnerability in PR review script#404

Open
seonghobae wants to merge 1 commit into
developfrom
fix/pr-merge-scheduler-security-fix-14548064859255373281
Open

πŸ”’ Fix command injection vulnerability in PR review script#404
seonghobae wants to merge 1 commit into
developfrom
fix/pr-merge-scheduler-security-fix-14548064859255373281

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

🎯 What: Command injection vulnerability in dispatch_opencode_review and enable_auto_merge due to unsanitized ref and sha parameters directly injected into a subprocess gh command.
⚠️ Risk: An attacker controlling git refs/branches could execute arbitrary commands when this script attempts to dispatch workflows or merge PRs.
πŸ›‘οΈ Solution: Added explicit validate_git_ref and validate_git_sha checks using regex to verify refs only contain valid word characters/slashes/dashes/dots and shas are precisely 40-character hex strings.


PR created automatically by Jules for task 14548064859255373281 started by @seonghobae

@google-labs-jules

Copy link
Copy Markdown

πŸ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a πŸ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@opencode-agent

Copy link
Copy Markdown

OpenCode Review Overview

  • Head SHA: ad777e60b3c7d1ae51e440331e44a3ee6012c89d
  • Workflow run: 27910171903
  • Workflow attempt: 1
  • Gate result: OPENCODE_REVIEW_UNAVAILABLE (approval step)

OpenCode Agent did not produce a valid review payload after all current-head GitHub Checks completed.

  • Result: OPENCODE_REVIEW_UNAVAILABLE
  • Reason: OpenCode review attempts did not complete or did not return a valid control block.
  • OpenCode outcomes: primary=failed, fallback=failed, second_fallback=failed

OpenCode runtime evidence:

  • primary model call failed: Request body too large for gpt-5 model. Max size: 4000 tokens.
  • Head SHA: ad777e60b3c7d1ae51e440331e44a3ee6012c89d
  • Workflow run: 27910171903
  • Workflow attempt: 1

No blocking review was submitted because this is an agent/runtime failure, not a source-backed code finding.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant