T09 · Insecure Skill Coding Practices
- Location
scripts/search.py:6- Finding
Google API Key Exposure Through Unsanitized HTTP Error Output
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Google Search skill does what it claims, but its error handling and example usage can expose Google API credentials in logs or command history.
Review before installing. Use a tightly restricted Google API key for Custom Search only, avoid putting real keys directly in shell commands, and prefer updating the script to redact request URLs and report sanitized HTTP errors before using it in logged or shared agent sessions.
scripts/search.py:6Google API Key Exposure Through Unsanitized HTTP Error Output
The skill declares capabilities that require access to environment variables and the network, but it does not specify any explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and can allow the skill to run with broader access than users or hosting frameworks may expect, which is especially relevant because it handles API credentials and performs outbound requests.
The example usage places API credentials directly on the command line, which can expose secrets through shell history, process listings, logs, and screenshots. Because this is documentation intended to be copied by users, it creates a realistic pathway for accidental credential leakage even if the underlying code is otherwise legitimate.