fix(security): replace string splitting with array args in git-wrapper - #450
Conversation
- Replace execGit(string) with execGitArgs(array) as primary method - All internal callers now use array-based arguments directly - Eliminates command injection risk from string splitting (spaces in branch names, file paths, tag messages would break or inject args) - Preserve execGit() as deprecated wrapper for backwards compatibility with branch-manager, conflict-resolver, and worktree-manager Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@riaworks is attempting to deploy a commit to the Pedro Valério Lopez's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
Note Reviews pausedUse the following commands to manage reviews:
Use the checkboxes below for quick actions:
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@coderabbitai ignore |
|
When you're ready to resume reviews here, just mention me with ✅ Actions performedReviews paused. |
Summary
execGit(string)withexecGitArgs(array)as the primary method ingit-wrapper.jscommand.split(' ')(spaces in branch names, file paths, or tag messages would break or inject arguments)execGit()as a deprecated backwards-compatible wrapper for external consumers (branch-manager,conflict-resolver,worktree-manager)Context
The original
execGit()usedcommand.split(' ')to parse command strings, which is a known injection vector:Files Changed
git-wrapper.jsexecGitArgs()method, all internal callers migrated,execGit()deprecatedBackwards Compatibility
execGit()still works for external callers (7 files reference it) — it delegates toexecGitArgs()internally. These callers can be migrated in follow-up PRs.Test plan
npm testpassesexecGit()continue to work🤖 Generated with Claude Code