Tainted flow: 'req' from os.environ.get (line 197, 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 for attempt in range(max_retries): try: req = urllib.request.Request(endpoint, data=data, headers=headers) with urllib.request.urlopen(req, timeout=300) as resp: return json.loads(resp.read().decode("utf-8")) except urllib.error.HTTPError as e: body = _sanitize_api_error(e.read().decode("utf-8", errors="replace"))
