Repository navigation
Conversation
Replaced `execSync` with `execFileSync` in `packages/core/src/reconcile.ts` to prevent shell command injection when checking code syntax. The workspace path is dynamic and previously was passed into a shell command template, which could allow execution of arbitrary commands if it contained shell operators. Co-authored-by: connerkup <72580335+connerkup@users.noreply.github.com>
Deploying shielded-shell with Β
|
| Latest commit: |
885ed90
|
| Status: | Β β Β Deploy successful! |
| Preview URL: | https://a4da353c.shielded-shell.pages.dev |
| Branch Preview URL: | https://sentinel-fix-command-injecti-3o02.shielded-shell.pages.dev |
|
π 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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
π¨ Severity: CRITICAL
π‘ Vulnerability: Command injection vulnerability identified in
packages/core/src/reconcile.tswhere a shell string was constructed usingexecSync(\node --check "${tempFile}"`, { stdio: "pipe" });. SincetempFilederives fromoptions.workspace, any shell metacharacters (e.g."; ;") within the path could lead to arbitrary command execution by the Node.js shell. π― Impact: An attacker could execute arbitrary commands by manipulating the workspace path to contain shell operators. π§ Fix: ReplacedexecSyncwithexecFileSyncand provided the arguments as an array (["--check", tempFile]).execFileSyncbypasses the system shell entirely, passing arguments directly to the Node executable and naturally preventing any shell injections. β Verification: Rannpm run test -w @shieldedshell/core` successfully and observed that tests continued to pass perfectly. The execution of the check process remains functionally identical but is now immune to injection.PR created automatically by Jules for task 2242626316809812989 started by @connerkup