Tainted flow: 'req' from os.environ.get (line 136, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 92% confidence
- Finding
Sending the API key to the configured POI service is legitimate authentication, not inherently exfiltration. However, the code attaches the key without requiring HTTPS or constraining the destination and redirects, so an HTTP configuration or cross-origin redirect can expose the credential and location queries.
- Content
python "X-API-Key": key, "User-Agent": "Mozilla/5.0 (compatible; gaode-hotel/1.0)", }) with urllib.request.urlopen(req, timeout=15) as r: return json.loads(r.read())
