subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
Emails: {email_summary}""" result = subprocess.run([ OPENCLAW_BIN, 'agent', '--message', message, '--deliver',- Confidence
- 91% confidence
- Finding
- The code invokes an external agent binary with a prompt built from untrusted email content and environment-derived values, delegating further actions such as reading message bodies, checking calendars, and sending Telegram messages. Even though subprocess is called without shell=True, this still creates a prompt-injection and unintended-action path because adversarial email text can influence the downstream agent to perform extra actions or exfiltrate data.
