Tainted flow: 'request' from os.environ.get (line 72, 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 request.add_header("Content-Type", "application/json;charset=UTF-8") request.add_header("Accept", "application/json") request.add_header("Authorization", f"Bearer {api_key}") with urllib.request.urlopen(request, timeout=30, context=build_ssl_context()) as resp: raw = resp.read().decode("utf-8") return resp.status, json.loads(raw) if raw else {}
