Tainted flow: 'url' from os.getenv (line 271, credential/environment) → requests.post (network output)
- Category
- Data Flow
- Confidence
- 91% confidence
- Finding
The request URL is derived from a caller-controlled or environment-controlled base URL, and the client automatically attaches a Bearer API key and request payload to outbound requests. If an attacker can influence TOKENAPI_BASE_URL or the base_url argument, they can redirect traffic to an arbitrary host, causing credential leakage and exfiltration of submitted data; the default allowance of plain HTTP for localhost also weakens transport guarantees.
- Content
python } if body is not None: kwargs["json"] = body return requests.post(url, **kwargs) def _raise_for_status(resp: requests.Response) -> None:
