T09 · Insecure Skill Coding Practices
- Location
bin/run.mjs:18- Finding
API Credential Exposed Through Command-Line Arguments and URL Query Parameters
- Content
View full analysis
item.location === "query")) { const value = params[parameter.name]; if (value === undefined) { continue; } appendValue(url.searchParams, parameter.name, value); } } ``` The documented invocation also passes the secret as a command-line argument: ```bash node {baseDir}/bin/run.mjs --operation "gwApiAggregatorGetAuthorOrderExperienceV1" --token "$JUST_ONE_API_TOKEN" --params-json '{"oAuthorId":""}' ``` ### Technical Analysis Authentication is necessary for the Skill's declared API functionality, and the credential is sent only to the declared HTTPS host, `api.justoneapi.com`. However, the implementation exposes the credential through two avoidable channels: 1. The `--token` argument places the expanded secret in the process command line. Depending on operating-system permissions and monitoring configuration, command lines may be visible through process inspection, audit systems, shell tracing, or process telemetry. 2. Because `token` is designated as a query parameter, `applyQueryParams` appends it to the URL. Query strings are commonly retained by reverse proxies, API gatew ...[truncated 2130 chars]- Remediation
View remediation
