Tainted flow: 'req' from os.environ.get (line 43, 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.add_header("Content-Type", "application/json") req.add_header("X-Proxy-Token", PROXY_TOKEN) try: with urllib.request.urlopen(req, timeout=120, context=ctx) as resp: data = json.loads(resp.read().decode("utf-8")) if data.get("code") == 0: return data.get("data", {})
