subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def clone(owner: str, repo: str, branch: str | None, workdir: Path): target = workdir / f"{owner}__{repo}" if target.exists(): subprocess.run(["rm", "-rf", str(target)], check=True) cmd = ["git", "clone", "--depth=1"] if branch: cmd += ["--branch", branch]- Confidence
- 91% confidence
- Finding
- subprocess.run(["rm", "-rf", str(target)], check=True)
