T09 · Insecure Skill Coding Practices
Warning
- Location
- skill.js:29
- Finding
- Trello credentials exposed through URL query parameters<![CDATA[ ## Vulnerability Details **File Location**: `skill.js:29-38` **Vulnerability Type**: Sensitive credentials in request URLs **Risk Level**: Medium ### Vulnerable Code ```js url.searchParams.set("key", auth.apiKey); url.searchParams.set("token", auth.token); for (const [k, v] of Object.entries(params)) { url.searchParams.set(k, v); } assertTrelloDomain(url); const res = await fetch(url.toString()); ``` ### Technical Analysis The implementation places the Trello API key and token in URL query parameters before serializing the complete URL for `fetch`. HTTPS encrypts the request in transit, and `assertTrelloDomain` limits the direct destination to `api.trello.com`. However, credentials in URLs can still be captured by infrastructure that records complete request URLs, including: - Server or proxy access logs - Runtime instrumentation and HTTP tracing - Observability and application-performance monitoring systems - Debugging tools - Exception or diagnostic telemetry The risk is increased because `SKILL.md` recommends creating a token with `expiration=never`. If such a token is disclosed, it remains useful until explicitly revoked. The network communication is necessary for the declared Trello functionality, and no transmission to an undeclared third-party host was found. The vulnerability concerns the credential transport mechanism rather than the legitimacy of the destination. ### Attack Path 1. A user configures the Skill with a valid Trello API key and read-scoped token. 2. `trelloFetch` adds both credentials to the request URL. 3. The serialized URL passes through a component that records complete request URLs. 4. An attacker or unauthorized operator gains access to those logs or traces. 5. The attacker extracts the API key and token. 6. The attacker submits authenticated requests directly to Trello and accesses resources authorized by the victim's token. This path requires access to request telemetry, logs, or another component that ca ...[truncated 583 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Use a Trello-supported authorization header or another mechanism that keeps credentials out of the URL, if available for the required API endpoints. 2. If Trello requires query-parameter authentication: - Ensure URL query strings are redacted from application, proxy, monitoring, and tracing logs. - Never include the complete request URL in errors or diagnostic output. - Disable or sanitize HTTP-client instrumentation that records query parameters. 3. Prefer tokens with limited scope and expiration over non-expiring tokens. 4. Document token rotation and immediate revocation procedures. 5. Add automated tests verifying that credentials never appear in application logs, returned errors, or telemetry. ]]>
