T09 · Insecure Skill Coding Practices
- Location
weatherkit.py:90- Finding
Unconditional Logging of Precise Location and Weather Response Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This WeatherKit skill is mostly purpose-aligned, but it automatically logs precise location requests and full weather responses.
Review this skill before installing if you use precise coordinates or sensitive locations. The WeatherKit credential flow appears expected, but the debug logging should be removed or made opt-in with redaction before use in shared, hosted, CI, or centrally logged environments.
weatherkit.py:90Unconditional Logging of Precise Location and Weather Response Data
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
print(f"DEBUG: Request URL: {full_url}", file=sys.stderr) # Debugging line
try:
response = requests.get(full_url, headers=headers)
response.raise_for_status() # Raise an exception for HTTP errors (4xx or 5xx)
print(f"DEBUG: Raw response text: {response.text}", file=sys.stderr)
The skill requires access to environment variables, reads a private key file, and makes outbound network requests, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a least-privilege and reviewability gap: a user or platform may not be clearly informed that the skill can access sensitive credentials and external services, increasing the risk of unintended secret exposure or broader-than-expected execution.
The API path is constructed as "/weather/en-US/{latitude}/{longitude}", which forces a specific language/locale regardless of user preference. This is a natural-language locale policy issue because the skill does not offer a language choice or explain why en-US is required.
No suspicious patterns detected.