Tainted flow: 'req' from os.environ.get (line 52, credential/environment) → urllib.request.urlopen (network output)
- Category
- Data Flow
- Confidence
- 93% confidence
- Finding
Sending the API key as a Bearer token to the intended HTTPS service is legitimate authentication, not inherently exfiltration. However, JUSOU_BASE_URL accepts an arbitrary destination, including plaintext HTTP, and the request attaches the key without origin validation; an attacker able to influence that setting could capture the credential and query content.
- Content
python data=json.dumps(body).encode(), headers={"Authorization": "Bearer " + key, "Content-Type": "application/json"}) try: with urllib.request.urlopen(req, timeout=a.timeout) as r: out = json.loads(r.read()) except urllib.error.HTTPError as e: try:
