Tainted flow: 'api_url' from os.getenv (line 43, credential/environment) → requests.post (network output)
Critical
- Category
- Data Flow
- Content
data = {"tool_name": tool_name, "parameters": parameters} try: response = requests.post(api_url, json=data, headers=headers, timeout=timeout) response.raise_for_status() return response.json() except requests.RequestException as e:- Confidence
- 95% confidence
- Finding
- The request destination is taken directly from the TOOL_API_URL environment variable and used in requests.post while the Authorization bearer token is attached to every request. If an attacker can influence the environment or deployment config, they can redirect traffic to an attacker-controlled endpoint and exfiltrate the API token and any submitted research data. In an agent/tooling context, this is more dangerous because the script is explicitly designed to send authenticated requests and may be run in shared CI, container, or plugin environments where env vars are easier to tamper with.
