Tainted flow: 'req' from os.environ.get (line 45, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
data = json.dumps(payload).encode("utf-8") headers["Content-Type"] = "application/json" req = urllib.request.Request(url, method=method, data=data, headers=headers) with urllib.request.urlopen(req) as resp: return json.loads(resp.read())- Confidence
- 95% confidence
- Finding
- The request target is influenced by HUANGLI_BASE from the environment, and the code sends the Authorization bearer token to whatever host that base points to. In an agent or hosted runtime where environment variables can be altered, this creates SSRF-style behavior and credential exfiltration risk because secrets are transmitted to an attacker-controlled endpoint.
