Tainted flow: 'req' from os.environ.get (line 151, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 94% confidence
- Finding
The request destination is influenced by the user-controlled host value resolved from command-line arguments, environment variables, or local config, and the client automatically attaches the Bearer API key to every outbound request. This allows credential exfiltration to an arbitrary server if A7W_HOST/--host/config is tampered with, turning the generic HTTP client into an SSRF-like secret-leaking proxy.
- Content
python headers["Content-Type"] = "application/json" req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=timeout) as resp: raw = resp.read().decode("utf-8", "replace") status = resp.status except urllib.error.HTTPError as exc:
