Tainted flow: 'api_key' from os.environ.get (line 28, credential/environment) → requests.post (network output)
- Category
- Data Flow
- Confidence
- 90% confidence
- Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
- Content
python with open(user_image, "rb") as f: files = {"user_image": (os.path.basename(user_image), f)} response = requests.post(API_URL, headers={"x-api-key": api_key}, files=files, data=data, timeout=60) if not response.ok: print(f"Error {response.status_code}: {response.text}", file=sys.stderr)
