Tainted flow: 'req' from os.environ.get (line 300, credential/environment) → urllib.request.build_opener.open (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 headers["content-type"] = "application/json" req = urllib.request.Request(CONNECT + path, data=data, method="POST" if data is not None else "GET", headers=headers) try: with urllib.request.build_opener(NoRedirect).open(req, timeout=timeout) as response: return response.status, json.loads(bounded_body(response) or "null"), int(response.headers.get("retry-after") or 0) except urllib.error.HTTPError as error: text = bounded_body(error)
