subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if repo_dir.exists(): run_git(repo_dir, ["fetch", "--tags", "--prune", "origin"]) return repo_dir subprocess.run( ["git", "clone", "--depth=1", source_url, str(repo_dir)], check=True, text=True,- Confidence
- 89% confidence
- Finding
- The code performs 'git clone' on a source URL taken from lockfile/provider data without validating the protocol or constraining git's behavior. A malicious source URL can cause connections to attacker-controlled endpoints, including local-network or local-file style transports, creating SSRF-style reachability, unintended local access, and execution of risky git transport behaviors during update checks.
