Tainted flow: 'req' from os.environ.get (line 66, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 96% confidence
- Finding
When MODEL_BACKEND=api, the skill sends the full transcript, history block, and question to an external endpoint, and both the destination base URL and bearer token are sourced from environment variables. This creates a real data exfiltration path for any sensitive evaluation content and also allows SSRF-style abuse if REAL_API_BASE is set to an internal or attacker-controlled host.
- Content
python base + "/chat/completions", data=body, method="POST", headers={"Authorization": f"Bearer {key}", "Content-Type": "application/json"}) try: with urllib.request.urlopen(req, timeout=30) as r: data = json.loads(r.read().decode("utf-8")) return data["choices"][0]["message"]["content"].strip() except Exception as e:
