T09 · Insecure Skill Coding Practices
- Location
src/utils/request.js:83- Finding
API Credential Transmitted in URL Query Strings
- Content
View full analysis
- Remediation
View remediation
``` 3. Refactor the request helper to accept credentials separately from ordinary query parameters: ```js const options = { host: constants.BASE_URL, path: fullPath, method: "GET", headers: { "Content-Type": "application/json", Authorization: `Bearer ${token}`, }, }; ``` 4. Configure reverse proxies, API gateways, and telemetry systems to redact both `Authorization` and any legacy `token` query parameter. 5. Avoid including request URLs or headers in user-facing errors and debug output. 6. Rotate credentials that have previously been transmitted through query strings, because historical logs may retain them. 7. Add automated tests asserting that generated request paths never contain `token=`, `GUAIKEI_API_TOKEN`, or the configured credential value. ]]>
