Skip to content

πŸ›‘οΈ Sentinel: [HIGH] Fix command option injection in Git calls - #592

Merged
tamld merged 1 commit into
mainfrom
sentinel-command-injection-11627232452063960269
Oct 17, 2026
Merged

tamld merged 1 commit into
mainfrom
sentinel-command-injection-11627232452063960269

Conversation

@tamld

@tamld tamld commented Oct 15, 2026

Copy link
Copy Markdown
Owner
  • 🚨 Severity: HIGH
  • πŸ’‘ Vulnerability: Calls to exec.Command("git", ...) appended paths or branch names without explicitly indicating the end of options using --. If an untrusted path or branch name starts with -, Git parses it as an option, which can lead to command option injection.
  • 🎯 Impact: An attacker could potentially inject arbitrary command-line options into git executions (like --force, --exec, or others) if they can control the branch or path name, leading to unauthorized operations or potential RCE in some contexts.
  • πŸ”§ Fix: Added -- to separate the git subcommands from the user-provided variables (specifically deliverableDir and taskID inside cmd/g8s/deliver.go) ensuring they are strictly treated as positional arguments and not flags.
  • βœ… Verification: Ran gofmt, local build (go build ./...), and full test suite (CGO_ENABLED=1 go test -v -race ./...) to ensure that this fix does not introduce side effects and passes all current assertions.

PR created automatically by Jules for task 11627232452063960269 started by @tamld

@google-labs-jules

Copy link
Copy Markdown
Contributor

πŸ‘‹ 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.

@tamld
tamld marked this pull request as ready for review October 17, 2026 15:59
Co-authored-by: tamld <63218248+tamld@users.noreply.github.com>
@tamld
tamld force-pushed the sentinel-command-injection-11627232452063960269 branch from ee66e48 to 8554d58 Compare October 17, 2026 16:05
@tamld
tamld merged commit e7551d3 into main Oct 17, 2026
16 checks passed
@tamld
tamld deleted the sentinel-command-injection-11627232452063960269 branch October 17, 2026 16:06
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