T09 · Insecure Skill Coding Practices
- Location
bin/run.mjs:136- Finding
API Token Exposed Through Command-Line Arguments
- Content
View full analysis
"}' ``` ### Technical Analysis The helper accepts the JustOneAPI access token through the `--token` command-line option. When the documented shell command is executed, the shell expands `JUST_ONE_API_TOKEN`, placing its value directly in the Node.js process argument vector. Depending on operating-system access controls and deployment configuration, command-line arguments may be visible through process inspection utilities, process metadata interfaces, monitoring agents, crash reports, audit systems, or telemetry collectors. The implementation does not print the token itself, but accepting it through `process.argv` unnecessarily increases the number of local systems that may observe the credential. This behavior exceeds minimum privilege in credential handling because the declared API functionality can instead obtain the required token directly from the already-declared `JUST_ONE_API_TOKEN` environment variable or through protected standard input. ### Attack Path 1. A user follows the command documented in `SKILL.md`. 2. The shell expands `$JUST_ONE_API_TOKEN` into the plaintext token. 3. The token becomes part of the Node.js process argument vector. 4. A local user, privileged process-monitoring service, diagnostic collector, or telemetry system captures the command-line arguments. 5. An attacker or unauthorized operator retrieves the token from the captured process metadata. 6. The token is replayed against JustOneAPI un ...[truncated 645 chars]- Remediation
View remediation
"}' ``` 3. Where stronger isolation is required, accept credentials through protected standard input or an operating-system secret manager. 4. Ensure process monitoring, crash reporting, and telemetry systems redact historical `--token` values. 5. Rotate any token that may already have been captured in process logs or monitoring data. ]]>
