subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
else: cmd = ['openclaw', 'agent', '--prompt', prompt] result = subprocess.run( cmd, capture_output=True, text=True, timeout=60,- Confidence
- 93% confidence
- Finding
- The code invokes an external local AI CLI and passes it untrusted buyer messages, item data, and full conversation history. Even without shell=True, this creates a prompt-injection and data-exfiltration boundary: the external tool may interpret hostile input, access local files or network resources, or leak sensitive marketplace data depending on the CLI's behavior and permissions.
