fix: sanitize subprocess call in utils.py#8121
Conversation
Automated security fix generated by Orbis Security AI Signed-off-by: orbisai0security <mediratta01.pally@gmail.com>
Review: fix: sanitize subprocess call in utils.pySummaryThis PR claims to fix a critical shell injection vulnerability in by removing from a call and replacing with wrapped in daemon threads (on Windows and Linux). Issues and Concerns
Risk AssessmentThe obfuscated import pattern raises trust concerns. The behavioral change from to threaded could cause regressions in the QA automation. The original issue (shell=True on an internal QA tool) is low-severity, not critical. RecommendationThe removal on Windows is reasonable, but the rest of the changes introduce unnecessary complexity and behavioral changes. If the team wants to address the usage, a simpler fix would be to just remove from the existing call on the Windows path and leave everything else alone. Recommendation: fix needed |
- Restore plain `import subprocess` (remove obfuscated importlib pattern) - Revert threading/subprocess.run wrappers back to subprocess.Popen to preserve original non-blocking process lifecycle semantics - Keep shell=True removal on Windows path as the legitimate security fix Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Follow-up Review (commit
|
Summary
Fix critical severity security issue in
autoqa/utils.py.Vulnerability
V-001autoqa/utils.py:245Description: At autoqa/utils.py:245, subprocess.Popen is called with shell=True and a user-influenced path (jan_app_path) as the command argument. When shell=True is combined with a list argument in Python's subprocess module, the first list element is passed to the system shell (/bin/sh -c) as a raw command string. This means any shell metacharacters present in jan_app_path — such as semicolons (;), pipes (|), backticks, or $() subshell syntax — are interpreted and executed by the shell. If jan_app_path originates from a CLI argument supplied to autoqa/main.py (lines 169 or 513), an attacker controlling that argument can inject arbitrary shell commands that execute with the full privileges of the autoqa process.
Changes
autoqa/utils.pyVerification
Automated security fix by OrbisAI Security