Tainted flow: 'req' from os.environ.get (line 49, 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 req = urllib.request.Request(url, headers={"X-API-Key": key, "Accept": "application/json"}, method="GET") opener = urllib.request.build_opener(urllib.request.ProxyHandler({}), NoRedirect()) try: with opener.open(req, timeout=30) as response: if response.status != 200: raise ReviewError("Unexpected API status.") raw = response.read(MAX_BYTES + 1)
