Tainted flow: 'req' from os.environ.get (line 153, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 94% confidence
- Finding
Sending audio and the configured API key to an explicitly configured ASR service is expected functionality, not inherently exfiltration. However, this request accepts plaintext HTTP and uses urllib's default redirect handling, which can forward the Authorization header to another origin on a permitted redirect, exposing the credential outside the intended service.
- Content
python method="POST", ) try: with urllib.request.urlopen(req, timeout=180) as resp: data = json.loads(resp.read().decode("utf-8", errors="replace")) except urllib.error.HTTPError as exc: detail = sanitize_api_error(exc.read().decode("utf-8", errors="replace"), (api_key,))
