π‘οΈ Sentinel: [CRITICAL/HIGH] Fix Option Injection#69
π‘οΈ Sentinel: [CRITICAL/HIGH] Fix Option Injection#69
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. |
π¨ Severity: HIGH
π‘ Vulnerability: Option Injection (Command Injection) via array-based arguments. The
mainFileparameter was passed directly to thelatexmkbinary via array-based argument passing (Command::new("latexmk").arg(&req.main_file)) without validating if the filename started with a hyphen (-). This allowed attackers to provide filenames like-shell-escapeor-interaction=..., whichlatexmkwould interpret as command-line flags.π― Impact: Attackers could inject arbitrary options into the
latexmkcommand execution, potentially escaping the intended execution context or gaining unintended execution capabilities on the compile worker.π§ Fix: Modified the parsing of
mainFileinCompileQueueService.enqueueto strictly validate and reject any filename starting with a-by throwing a 400 Bad Request error. Added a critical learning entry to.jules/sentinel.md.β Verification: Ran the full project test suite using Vitest to confirm no regressions and manually verified the
mainFilelogic via code inspection.PR created automatically by Jules for task 16557289786198474322 started by @dttdrv