T09 · Insecure Skill Coding Practices
Warning
- Location
- SKILL.md:121
- Finding
- API Credential Transmitted in URL Query Parameters## Vulnerability Details **File Location**: `SKILL.md`, lines 121–123 **Vulnerability Type**: Query-string credential exposure **Risk Level**: Medium ### Complete Relevant Snippet ```markdown **Base URL**: Read from the skill configuration `DAILY_TANG_POEM_API_URL`; the default is defined in the manifest. **Authentication**: Only when `DAILY_TANG_POEM_API_KEY` is configured, append `?key=configured-value` to every request; otherwise, do not append it. ``` The excerpt above is a faithful English translation of the documented authentication instruction. ### Technical Analysis The skill instructs clients to transmit `DAILY_TANG_POEM_API_KEY` through the URL query string. Query strings are commonly recorded in web-server access logs, reverse-proxy logs, observability platforms, error reports, browser history, and debugging traces. HTTPS protects the URL while it is in transit but does not prevent the endpoint or intermediate application infrastructure from recording it. The instruction also says to attach the key to every request. This unnecessarily increases the number of locations where the credential may be retained and broadens its exposure across endpoints that may not all require authentication. ### Attack Path 1. A user configures `DAILY_TANG_POEM_API_KEY`. 2. The skill appends the credential to API URLs as `?key=...`. 3. The Vercel deployment, a reverse proxy, an analytics service, or a diagnostic system records the complete requested URL. 4. An attacker, service operator, support user, or other party with access to those logs obtains the key. 5. The exposed key is replayed against the API until it is revoked or expires. ### Impact Assessment An exposed credential may grant unauthorized access to any API operations accepted by that key, including reading poem and review data, submitting validation requests, or modifying pass records, depending on the backend's authorization model. The project does not docu ...[truncated 291 chars]
- Remediation
- ## Remediation Suggestions 1. Transmit the credential in an HTTP authorization header, such as: ```http Authorization: Bearer <API_KEY> ``` 2. Never include authentication secrets in query strings, route paths, analytics parameters, or error messages. 3. Attach credentials only to endpoints that require authentication. 4. Configure the backend and reverse proxy to redact authorization headers from logs. 5. Use scoped, short-lived credentials where possible and provide an explicit revocation and rotation mechanism. 6. Apply server-side authorization independently to each operation rather than treating possession of one unrestricted key as sufficient. 7. Rate-limit authentication failures and monitor for replay from unexpected clients or locations.
