Tainted flow: 'req' from os.environ.get (line 257, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
- Content
python def http_json(url: str, headers: dict[str, str] | None = None, timeout: int = 20) -> Any: req = urllib.request.Request(url, headers=headers or {}) with urllib.request.urlopen(req, timeout=timeout) as resp: charset = resp.headers.get_content_charset() or "utf-8" return json.loads(resp.read().decode(charset, errors="replace"))
