Tainted flow: 'req' from os.environ.get (line 151, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
The client allows the request destination to be overridden from CLI/config/environment via the host value, then sends the bearer API key to that URL in the Authorization header. If an attacker can influence A7W_HOST or saved config, they can redirect requests to an attacker-controlled server and exfiltrate credentials and request payloads.
- Content
python headers["Content-Type"] = "application/json" req = urllib.request.Request(url, data=data, headers=headers, method=method) try: with urllib.request.urlopen(req, timeout=timeout) as resp: raw = resp.read().decode("utf-8", "replace") status = resp.status except urllib.error.HTTPError as exc:
