subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def clone_repo(url: str, staging_dir: str): subprocess.run( ["git", "clone", "--depth", "1", url, staging_dir], check=True, capture_output=True, text=True, )- Confidence
- 86% confidence
- Finding
- The script performs a `git clone` on a user-supplied URL without validating the scheme, host, or repository source. Although `shell=True` is not used, invoking Git on untrusted URLs can trigger network access to attacker-controlled endpoints and potentially interact with dangerous Git transport behaviors or local-path targets, which is risky in an automated security-analysis workflow.
