Description
In verify.py:30-38, the git clone and git checkout subprocess calls have no timeout parameter. A malicious or unresponsive repository URL could hang the process indefinitely.
This also applies to the CLI's diff command where the user provides the --repo URL directly.
Suggested fix
Add a reasonable timeout to both subprocess.run calls, e.g.:
subprocess.run(
["git", "clone", "--", repo_url, str(dest)],
check=True,
capture_output=True,
timeout=300, # 5 minutes
)
Description
In
verify.py:30-38, thegit cloneandgit checkoutsubprocess calls have notimeoutparameter. A malicious or unresponsive repository URL could hang the process indefinitely.This also applies to the CLI's
diffcommand where the user provides the--repoURL directly.Suggested fix
Add a reasonable
timeoutto bothsubprocess.runcalls, e.g.: