π‘οΈ Sentinel: [CRITICAL] Fix command injection in SSH client execution - #225
π‘οΈ Sentinel: [CRITICAL] Fix command injection in SSH client execution#225bobdivx wants to merge 1 commit into
Conversation
π¨ Severity: CRITICAL π‘ Vulnerability: Command injection vulnerability in the SSH client due to dynamic shell command construction passed to `execSync`. π― Impact: An attacker could potentially inject malicious shell commands on the host system running the Node process if they can manipulate the command being executed. π§ Fix: Refactored `exec()` to use `execFileSync` with argument arrays, preventing local shell interpolation. Cleaned up unused variables to satisfy strict linter checks. β Verification: Run `pnpm test` and `pnpm run check` to ensure no regressions. Co-authored-by: bobdivx <6737167+bobdivx@users.noreply.github.com>
|
π 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. |
Fixed a critical command injection vulnerability in
src/lib/forge-infra-client.tswhere SSH commands were dynamically constructed and passed toexecSync().Refactored execution to use
execFileSyncand pass arguments as an array to prevent shell interpolation, completely neutralizing the injection threat while maintaining full compatibility with both the nativesshbranch and the Node fallbackssh2branch. Cleaned up unused local variables that became obsolete during the refactor to satisfy strict TS/ESLint checks. Documented findings in.jules/sentinel.md. All automated tests and static checks pass cleanly.PR created automatically by Jules for task 8729641557807688720 started by @bobdivx