Tainted flow: 'run_args' from os.environ.get (line 117, credential/environment) → subprocess.run (code execution)
Medium
- Category
- Data Flow
- Content
if os.name == "nt" and args and args[0].lower().endswith((".cmd", ".bat")): run_args = [os.environ.get("COMSPEC", "cmd.exe"), "/c", *args] result = subprocess.run( run_args, capture_output=True, text=True,- Confidence
- 80% confidence
- Finding
- result = subprocess.run( run_args, capture_output=True, text=True, timeout=timeout, check=False, encoding="utf-8",
