T09 · Insecure Skill Coding Practices
- Location
bin/run.mjs:18- Finding
API Authentication Token Exposed Through URL Query Parameters
- Content
View full analysis
parameter.name === "token"); if (!tokenParam || params.token !== undefined) { return; } if (!cliToken) { fail("--token is required for this operation.", { operationId: operation.operationId, }); } params.token = cliToken; } ``` Every query parameter, including the token, is appended to the request URL: ```js function applyQueryParams(operation, params, url) { for (const parameter of operation.parameters.filter((item) => item.location === "query")) { const value = params[parameter.name]; if (value === undefined) { continue; } appendValue(url.searchParams, parameter.name, value); } } function appendValue(searchParams, name, value) { if (Array.isArray(value)) { for (const item of value) { appendValue(searchParams, name, item); } return; } if (value && typeof value === "object") { searchParams.append(name, JSON.stringify(value)); return; } searchParams.append(name, String(value)); } ``` ### Technical Analysis The Skill transmits its API authentication token in the query string of an HTTPS request to the fixed host `api.justoneapi.com`. HTTPS protects the request from passive interception while in transit, but it does not prevent the complete URL from being captured by components that process or obse ...[truncated 2426 chars]- Remediation
View remediation
