π‘οΈ Sentinel: [HIGH] Fix Command Injection vulnerability via malicious Git configuration#73
Conversation
Disable core.fsmonitor when invoking Git commands via subprocess to prevent potential command injection via a malicious .git/config file in an untrusted directory. Added to src/wardline/core/delta.py and src/wardline/core/legis.py. Also updated unit tests to match. Co-authored-by: tachyon-beep <544926+tachyon-beep@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 risk via malicious Git configuration. Subprocess calls to
gitwithoutcore.fsmonitor=falsecan execute arbitrary commands if a malicious.git/configis present in an untrusted directory.π― Impact: If the static analyzer runs on a directory containing a maliciously crafted
.git/configfile (e.g., cloned from an untrusted source), it could lead to arbitrary local code execution when the analyzer queries git state.π§ Fix: Updated
subprocess.runcalls that invokegitinsrc/wardline/core/delta.pyandsrc/wardline/core/legis.pyto always pass the"-c", "core.fsmonitor=false"arguments (using the predefined_SAFE_GIT_CONFIG).β Verification: Ensure the test suite passes (
make test) and thatgitcommands now properly disablecore.fsmonitor. Checked withuv run pytest tests/unit/core/test_delta.pyand the fullmake test-cov.PR created automatically by Jules for task 7099007833558316659 started by @tachyon-beep