π‘οΈ Sentinel: [HIGH] Fix command injection in VS Code extension#84
π‘οΈ Sentinel: [HIGH] Fix command injection in VS Code extension#84
Conversation
Co-authored-by: raccioly <63126795+raccioly@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. |
π¨ Severity: HIGH
π‘ Vulnerability: Command injection vulnerability in
vscode-extension/extension.jsvia theexecSyncfunction. Theargsvariable, constructed from inputs within the extension context, was passed directly to a shell environment. Ifargsor paths contained shell metacharacters, it could lead to arbitrary command execution on the host machine.π― Impact: A malicious actor could exploit this vulnerability to execute arbitrary shell commands on a developer's machine using the VS Code extension.
π§ Fix: Replaced
execSyncwithexecFileSyncand an explicit array of arguments. This bypasses shell execution and ensures arguments are treated safely as program inputs. Included cross-platform fallback logic to properly append.cmdfor tools likenpxon Windows. Refactored theactivatefunction to handleasyncconstraints sincerefreshScore()includesawait.β Verification: Ran
node -cto verify no syntax errors were introduced. Verified that the overall test suite usingpnpm testsuccessfully completed without new regressions.PR created automatically by Jules for task 16202726504476685480 started by @raccioly