T09 · Insecure Skill Coding Practices
- Location
scripts/hello.sh:14- Finding
API Key and Sensitive Data Disclosure Through an Unrestricted Base URL
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 ;; esac ``` 3. For a supported set of enterprise instances, implement an exact hostname allowlist rather than substring or suffix matching. Parse and validate the URL with a proper URL parser where possible. 4. Require HTTPS and reject: - Plaintext HTTP. - Embedded URL credentials. - Unexpected ports. - Fragments and malformed URLs. - Unapproved hostnames. 5. Constrain curl protocols: ```bash curl --proto '=https' --proto-redir '=https' ... ``` 6. Do not enable cross-origin redirects for authenticated requests. If redirects are required, validate the final origin before transmitting an authorization header. 7. Treat `scripts/env` as security-sensitive configuration. Verify its ownership and permissions before sourcing it, and do not source a file writable by other users. 8. Clearly notify users that prompts and selected files are transmitted to the configured remote service, and require explicit user selection of every uploaded file. 9. Rotate the API key immediately if requests may have been sent to an untrusted destination. ]]>
