subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
notify_cmd = os.environ.get("NOTIFY_COMMAND") if not notify_cmd: raise ValueError("NOTIFY_COMMAND not set for command channel") proc = subprocess.run([notify_cmd, target, message], capture_output=True, text=True) if proc.returncode != 0: err = (proc.stderr or proc.stdout or "").strip() raise RuntimeError(f"command notify failed: {err}")- Confidence
- 96% confidence
- Finding
- proc = subprocess.run([notify_cmd, target, message], capture_output=True, text=True)
