Tainted flow: 'req' from os.environ.get (line 156, 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 req = urllib.request.Request(PROXY_URL, data=body.encode("utf-8"), headers={"Content-Type": "application/json", "X-Proxy-Token": PROXY_TOKEN}, method="POST") try: with urllib.request.urlopen(req, timeout=timeout) as r: result = json.loads(r.read().decode("utf-8")) if result.get("code") != 0 or result.get("error"): return {"error": result.get("error", "proxy error")}
