subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
for attempt in range(max_attempts): try: result = subprocess.run( [openclaw_bin, 'agent', '--local', '--to', '+860000000000', '--message', prompt], capture_output=True, text=True,- Confidence
- 82% confidence
- Finding
- The code resolves and executes an external OpenClaw binary discovered from environment variables, PATH, and globbed fallback locations, then passes sensitive health data prompts into it. While shell injection is avoided, this still creates an unsafe trust boundary: a malicious or trojaned binary in one of those locations would run with the script's privileges and receive private report data.
