Repository navigation
π‘οΈ Sentinel: [HIGH] Fix command option injection in Git calls - #592
Conversation
|
π 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Co-authored-by: tamld <63218248+tamld@users.noreply.github.com>
ee66e48 to
8554d58
Compare
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.gitexecutions (like--force,--exec, or others) if they can control the branch or path name, leading to unauthorized operations or potential RCE in some contexts.--to separate the git subcommands from the user-provided variables (specificallydeliverableDirandtaskIDinsidecmd/g8s/deliver.go) ensuring they are strictly treated as positional arguments and not flags.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