Back to skill

Security audit

WeatherKit

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
weatherkit.py:90
Finding

Unconditional Logging of Precise Location and Weather Response Data

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Tainted flow: 'headers' from os.getenv (line 63, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · weatherkit.py (reported line 93)May include surrounding context.

python
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)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.