Tainted flow: 'req' from os.environ.get (line 161, credential/environment) → urllib.request.urlopen (network output)
Critical
- Category
- Data Flow
- Content
}, method="POST", ) with urllib.request.urlopen(req, timeout=120) as resp: result = json.loads(resp.read().decode("utf-8")) return result["choices"][0]["message"]["content"] except urllib.error.HTTPError as e:- Confidence
- 96% confidence
- Finding
- The request destination is influenced by environment-derived configuration (`DEEPSEEK_BASE_URL`) and then used directly in `urllib.request.urlopen` with a bearer token header. If an attacker can control the environment or config, they can redirect API traffic and exfiltrate the DeepSeek API key plus sensitive trajectory/skill content to an arbitrary server, making this an SSRF-style secret disclosure issue.
