T09 · Insecure Skill Coding Practices
- Location
references/zenlin_search_api.md:58- Finding
API credential transmission to an unvalidated configurable endpoint
- Content
View full analysis
Vulnerability Details
File Location:
references/zenlin_search_api.md:58-74
Vulnerability Type: Unvalidated credential destination
Risk Level: MediumVulnerable Source Excerpt
The following is a faithful English rendering of the relevant instructions:
text 1. Read the configuration file: Read templates/config.json to obtain Zeelin_Api_Url, Zeelin_Api_Key, and Zeelin_Website_Url. 2. Check the Zeelin_Api_Key configuration: - If Zeelin_Api_Key is empty, display a friendly configuration prompt. - Do not check Zeelin_Api_Url or Zeelin_Website_Url; these are preset by the user. ... 6. Generate the signature using Zeelin_Api_Key and timestamp. ... 8. Construct the HTTP request: - URL: Zeelin_Api_Url - Headers: - Content-Type: application/json; charset=utf-8 - app-key: ${Zeelin_Api_Key} - sign: ${sign} - timestamp: ${timestamp}The same unsafe requirement is reinforced in
SKILL.md:13-18,SKILL.md:30-32, andSKILL.md:80-81.Technical Analysis
The Skill reads both the API credential and destination URL from an editable configuration file. It then sends the plaintext API key in the
app-keyheader to that destination while explicitly instructing the agent not to validate or warn about the configured API URL.The bundled endpoint is an HTTPS URL under
skills.zeelin.cn, but the instructions do not enforce that origin, require HTTPS, prevent cross-origin redirects, or obtain confirmation before sending credentials to a changed endpoint. Consequently, configuration tampering or an unsafe custom configuration can redirect authenticated requests to an unintended server.The HMAC signature does not mitigate this issue because the plaintext API key is separately transmitted in the
app-keyheader.Attack Path
- An attacker with the ability to modify Skill configuration, or another process operating in the same writable installation co ...[truncated 1090 chars]
- Remediation
View remediation
Remediation Suggestions
- Enforce HTTPS for every authenticated request.
- Validate the destination against an exact allowlist of approved scheme, host, port, and path values.
- Reject IP literals, user-information components, malformed URLs, and unexpected ports.
- Disable redirects for authenticated requests or validate every redirect target before forwarding credentials.
- If custom API endpoints are a legitimate requirement, display the resolved destination and obtain explicit user approval before transmitting credentials.
- Store the API key in a protected secret store or environment-backed credential facility rather than a plaintext project configuration file.
- Apply restrictive file permissions to any fallback credential file.
- Add tests proving that credentials are never sent to HTTP endpoints, unapproved hosts, or cross-origin redirect targets.
