Tainted flow: 'req' from os.environ.get (line 35, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
Sending a purpose-specific API key as authentication is legitimate, but the destination comes entirely from GAODE_POI_BASE without HTTPS or trusted-host validation. An insecure or attacker-influenced configuration can disclose the key and location queries, and default redirect handling can forward the custom X-API-Key header to another host; this is a conditional credential-disclosure risk, not evidence of deliberate exfiltration.
- Content
python "User-Agent": "govt-meal-skill/1.0.0", }) try: with urllib.request.urlopen(req, timeout=15) as r: return json.loads(r.read().decode()) except urllib.error.HTTPError as e: body = e.read().decode(errors="replace")
