subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: # 停止现有 Gateway log("停止现有 Gateway...") subprocess.run( ["pkill", "-f", "openclaw.*gateway"], capture_output=True )- Confidence
- 84% confidence
- Finding
- The script kills processes using a broad regex match, "openclaw.*gateway", without verifying the exact executable or ownership. This can terminate unintended processes whose command lines happen to match, enabling local denial of service or unsafe recovery behavior if an attacker can influence process names on the host.
