Tainted flow: 'req' from os.environ.get (line 25, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
_call_proxy sends user-supplied travel queries to a URL controlled by the RG_PROXY environment variable, and optionally includes a bearer token from PROXY_TOKEN. If the runtime environment is misconfigured or attacker-controlled, sensitive user itinerary data and credentials can be exfiltrated to an untrusted endpoint, and the code performs no allowlisting or trust verification of the destination.
- Content
python method="POST", ) try: with urllib.request.urlopen(req, timeout=30) as resp: data = json.loads(resp.read().decode("utf-8")) return data except urllib.error.HTTPError as e:
