T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:42
- Finding
- Weather API Examples Use Unencrypted HTTP Requests## Vulnerability Details **File Location**: `SKILL.md`, lines 42–49 **Vulnerability Type**: Plaintext HTTP communication **Risk Level**: Medium ### Vulnerable Code ```bash curl -s "wttr.in/San+Jose,CA?format=j1" ``` ```bash # Specific location curl -s "wttr.in/San+Jose,CA?format=3" # Named locations work well; coordinates less so ``` ### Technical Analysis The example URLs do not specify the HTTPS scheme. As a result, curl interprets them as plaintext HTTP URLs. Even if the service normally redirects clients to HTTPS, the initial request remains unencrypted and unauthenticated. An attacker capable of observing or modifying network traffic could read the requested location, prevent a legitimate redirect, or return a forged API response. Because this skill directs AI agents to consume the returned weather information, manipulated content could compromise the integrity of subsequent agent output. External API data must also be treated strictly as untrusted data rather than executable commands or trusted agent instructions. ### Attack Path 1. An agent follows one of the documented curl examples. 2. curl sends the location query over plaintext HTTP. 3. An attacker positioned on the local network, gateway, proxy, or another relevant network path intercepts the request. 4. The attacker reads the requested location or replaces the response with attacker-controlled weather data. 5. The agent consumes the forged response and may present incorrect information or use it in downstream decisions. ### Impact Assessment Exploitation does not directly grant operating-system privileges or code execution. Its scope is limited to the confidentiality and integrity of these weather API exchanges. An attacker may learn queried locations and manipulate weather information supplied to the agent. The practical effect depends on how downstream workflows use the response; decisions that rely on accurate weather data could be influence ...[truncated 2 chars]
- Remediation
- ## Remediation Suggestions 1. Specify HTTPS explicitly in every example: ```bash curl --fail --silent --show-error "https://wttr.in/San+Jose,CA?format=j1" curl --fail --silent --show-error "https://wttr.in/San+Jose,CA?format=3" ``` 2. Use `--proto '=https'` to prevent accidental use of plaintext protocols: ```bash curl --proto '=https' --fail --silent --show-error \ "https://wttr.in/San+Jose,CA?format=j1" ``` 3. If redirects are required, use `--location` together with `--proto '=https'` and `--proto-redir '=https'` so redirects cannot downgrade the connection. 4. Validate response status, content type, size, and expected JSON structure before consuming API data. 5. Treat all remote response fields as untrusted data and prevent them from being interpreted as shell commands or agent instructions.
