T09 · Insecure Skill Coding Practices
- Location
scripts/xhs_client.py:41- Finding
Remote Endpoint Override Permits Transmission of Sensitive Data to Arbitrary Servers
- Content
View full analysis
- Remediation
View remediation
` or an explicitly approved loopback equivalent. - Reject embedded credentials, fragments, unexpected schemes, and malformed ports. - Resolve hostnames and verify that every resulting address is loopback. 3. Disable redirects for sensitive API calls: ```python resp = requests.request(method, url, allow_redirects=False, **kwargs) ``` 4. If remote operation is genuinely required: - Require HTTPS. - Maintain a narrow destination allowlist. - Consider certificate or public-key pinning. - Require conspicuous, per-operation user confirmation. - Never permit sensitive publication or token requests over plaintext HTTP. 5. Update `SKILL.md` and `SETUP.md` so their stated guarantees exactly match runtime behavior. 6. Add automated tests proving that external hosts, redirect responses, unsupported schemes, and malformed endpoint values are rejected before request data is transmitted. ]]>
