Tainted flow: 'get_headers()' from os.environ.get (line 64, 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 def post(url: str, payload: dict, ok_statuses: tuple) -> dict: r = requests.post(url, headers=get_headers(), json=payload, timeout=30) if r.status_code not in ok_statuses: print(f"Error {r.status_code}: {r.text}", file=sys.stderr) sys.exit(1)
