T09 · Insecure Skill Coding Practices
- Location
bin/run.mjs:19- Finding
API Token Exposed Through Process 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; } ``` All parameters marked as query parameters, including `token`, are 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); } } ``` The documented invocation explicitly places the environment variable value in a command-line argument: ```bash node {baseDir}/bin/run.mjs --operation "searchKolSimpleV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"keyword":"","platformSource":"_1","page":1}' ``` ### Technical Anal ...[truncated 2946 chars]- Remediation
View remediation
