subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
"--message", prompt, ] completed = subprocess.run(command, capture_output=True, text=True, check=False) if completed.returncode != 0: return None payload = extract_json_object(extract_agent_reply(completed.stdout) or completed.stdout)- Confidence
- 89% confidence
- Finding
- This function sends user-derived text into an external agent process and then trusts the agent's JSON output to drive voice-routing decisions. Because the code treats another model/tool's output as authoritative control data, prompt injection or hostile agent behavior can manipulate local assistant state and trigger unintended actions.
