Tainted flow: 'get_api_key()' from os.environ.get (line 52, credential/environment) → requests.get (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 get(url: str, params: dict = None) -> dict: r = requests.get(url, headers={"x-api-key": get_api_key()}, params=params, timeout=60) if r.status_code != 200: print(f"Error {r.status_code}: {r.text}", file=sys.stderr) sys.exit(1)
