T09 · Insecure Skill Coding Practices
- Location
scripts/data_fetcher.py:108- Finding
FMP API Key May Be Exposed Through Plaintext Configuration and URL Query Parameters
- Content
View full analysis
Dict: """Fetch financial statements from FMP API.""" if not self.fmp_key: return {} endpoints = { "income": f"{self.fmp_base}/income-statement/{ticker}", "balance": f"{self.fmp_base}/balance-sheet-statement/{ticker}", "cashflow": f"{self.fmp_base}/cash-flow-statement/{ticker}", "ratios": f"{self.fmp_base}/ratios-ttm/{ticker}" } results = {} for name, url in endpoints.items(): try: resp = requests.get(f"{url}?apikey={self.fmp_key}", timeout=30) resp.raise_for_status() results[name] = resp.json() except Exception as e: results[name] = {"error": str(e)} return results ``` ### Technical Analysis The checked-in value is only a placeholder and is not itself a leaked credential. However, the configuration comments ...[truncated 2564 chars]- Remediation
View remediation
