Tainted flow: 'api_key' from os.environ.get (line 103, 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(document_path, "rb") as document: files = {"document": (os.path.basename(document_path), document)} response = requests.post( API_URL, headers={"x-api-key": api_key}, files=files, data=data, timeout=timeout )
