T09 · Insecure Skill Coding Practices
- Location
waifugenerator.js:11- Finding
API Token Exposure Through Command-Line Arguments
- Content
View full analysis
"your prompt" --token YOUR_TOKEN ``` ### Technical Analysis The skill accepts its Neta API token exclusively through the `--token` command-line argument. Command-line arguments are not an appropriate secret-transport mechanism because they can be exposed through: - Shell history files. - Process listings and process inspection interfaces. - Command telemetry, terminal logging, or audit systems. - Wrapper scripts and automation logs that record complete commands. The token is legitimately transmitted to the intended API through the `x-token` header, but its initial acquisition through `process.argv` unnecessarily exposes it on the local system. No hardcoded token or transmission to an unrelated domain was identified. ### Attack Path 1. A user follows the documented command and supplies a valid token using `--token`. 2. The shell records the complete command in its history, or the argument remains visible through process inspection while the script is running. 3. Another local user, monitoring tool, support bundle, or log collector obtains the command-line contents. 4. The exposed token is extracted and replayed against the Neta API. 5. The attacker performs API operations within the authorization and quota associated with the compromised token. ### Impact Assessment Successful exploitation does not grant additional operating-syst ...[truncated 324 chars]- Remediation
View remediation
