T09 · Insecure Skill Coding Practices
- Location
src/baidu_search.py:49- Finding
API Key Exposure Through Unsanitized HTTP Exception Output
- Content
View full analysis
`. 3. `response.raise_for_status()` raises an exception whose text may contain the requested URL. 4. The broad exception handler converts the exception to a string without redaction. 5. The resulting error text is returned to the caller and may reveal the API key. 6. Anyone with access to that output can reuse the exposed key against the Baidu API until it is revoked or expires. ### Impact Assessment Successful exploitation can disclose the configured Baidu API credential. The exposed key provides ...[truncated 378 chars]- Remediation
View remediation
