Tainted flow: 'req' from os.environ.get (line 27, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 91% confidence
- Finding
The script sends an authentication secret from the environment (PROXY_TOKEN) to a network endpoint whose URL is also fully controlled by an environment variable. If PROXY_URL is misconfigured or attacker-controlled, the token and all user query data will be exfiltrated to an arbitrary server. In a skill context, this is materially risky because the tool is explicitly designed to relay user search parameters through a proxy service.
- Content
python headers = {"Content-Type": "application/json", "X-Proxy-Token": PROXY_TOKEN} req = urllib.request.Request(PROXY_URL, data=payload, headers=headers, method="POST") try: with urllib.request.urlopen(req, timeout=timeout) as resp: return json.loads(resp.read().decode("utf-8")) except urllib.error.URLError as e: if "timed out" in str(e).lower():
