Tainted flow: 'req' from os.environ.get (line 210, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
The trial-key registration request also uses the environment-controlled BASE_URL, allowing redirection to an attacker-controlled endpoint. While this call may not yet include a bearer token, it still leaks usage metadata and can trick the tool into storing attacker-supplied API keys for later authenticated exfiltration.
- Content
python req.add_header("Content-Type", "application/json") req.add_header("Accept", "application/json") try: with urllib.request.urlopen(req, timeout=30) as response: payload = json.loads(response.read().decode("utf-8")) except urllib.error.HTTPError as exc: _, message = _server_error(exc.read().decode("utf-8", "replace"))
