subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
) try: p = subprocess.run( ["codex", "exec", prompt], cwd=repo_path, capture_output=True,- Confidence
- 96% confidence
- Finding
- The script invokes `codex exec` on a prompt built directly from untrusted Elasticsearch log content. Although `subprocess.run` is used with an argument list rather than a shell, this still creates an LLM prompt-injection sink: attacker-controlled logs can steer Codex into unsafe analysis, data exfiltration, or unintended code/tool actions in the repository context.
