Tainted flow: 'url' from os.environ.get (line 109, credential/environment) → requests.get (network output)
Critical
- Category
- Data Flow
- Content
try: url = f'https://finnhub.io/api/v1/quote?symbol={code}&token={FINNHUB_KEY}' r = requests.get(url, timeout=10).json() if r.get('c'): # current price return {- Confidence
- 94% confidence
- Finding
- The request URL embeds FINNHUB_KEY directly in the query string, which means an environment-sourced secret or fallback token is transmitted outbound and may be exposed in logs, debugging output, proxies, browser histories, or upstream monitoring systems. While sending an API key to its intended provider is normal, placing credentials in URLs materially increases leakage risk compared with safer header-based handling.
