T09 · Insecure Skill Coding Practices
- Location
bin/run.mjs:216- 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 query parameters, including the token, are appended to the 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 also instructs users to place the token in process arguments: ```bash node {baseDir}/bin/run.mjs --operation "titleMoreLikeThisQuery" --token "$JUST_ONE_API_TOKEN" --params-json '{"id":""}' ``` ### Technical Analysis The credential is exposed through two separate metadata channels: 1. Passing the token through `--token` places it in the process argument vector. Depending on operating-system configuration and exec ...[truncated 2348 chars]- Remediation
View remediation
