T09 · Insecure Skill Coding Practices
- Location
bin/run.mjs:24- Finding
API Token Exposure Through Command-Line Arguments and 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; } ``` ```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); } } ``` The documented invocation also places the token in a command-line argument: ```bash node {baseDir}/bin/run.mjs --operation "shareDouyinUrlTransferV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"shareUrl":""}' ``` ### Technical Analysis The Skill sends the API token to the declared JustOneAPI endpoint as ...[truncated 2993 chars]- Remediation
View remediation
