subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"--target", FEISHU_USER_OPEN_ID, "--message", message ] result = subprocess.run(cmd, capture_output=True, text=True, timeout=30) if result.returncode == 0: print("\n✅ 监控完成,推送成功")- Confidence
- 93% confidence
- Finding
- The code invokes an external executable via subprocess using arguments that include environment-derived data and large untrusted message content. Although shell injection is mitigated by passing a list and not using shell=True, this still creates a command-execution boundary where attacker-controlled values can influence the behavior of the external CLI, leak data, or trigger unintended actions in that tool.
