Tainted flow: 'url' from os.getenv (line 100, credential/environment) → requests.get (network output)
Critical
- Category
- Data Flow
- Content
# ────────────────────────────────────────────────────── def download_image(url: str, out_path: str) -> bool: try: r = requests.get(url, timeout=60) r.raise_for_status() Path(out_path).parent.mkdir(parents=True, exist_ok=True) with open(out_path, "wb") as f:- Confidence
- 94% confidence
- Finding
- The script downloads whatever URL is returned by the image-generation API and passes it directly to requests.get without validating the scheme, host, or destination. If the upstream service, SDK, or response is compromised, this can turn the script into an SSRF-capable client that makes arbitrary outbound requests, potentially reaching internal services or sensitive metadata endpoints from the user's environment.
