Tainted flow: 'headers' from os.getenv (line 76, credential/environment) → requests.post (network output)
- Category
- Data Flow
- Confidence
- 93% confidence
- Finding
Sending authentication headers to the intended HTTPS API is legitimate, but --base-url accepts arbitrary destinations and plaintext HTTP without validation. If an attacker can influence that argument, the request exposes the access key, generated signature, and submitted facial data to an attacker-controlled destination; automatic redirects can also forward these custom authentication headers across origins. The secret key itself is not transmitted directly.
- Content
python "AccessKey": access_key, "Signature": generate_signature(access_key, secret_key), } resp = requests.post( url, headers=headers, data=data, files=files, timeout=timeout ) resp.raise_for_status()
