T09 · Insecure Skill Coding Practices
- Location
magazinecovergenerator.js:18- Finding
API Token Exposed Through Command-Line Arguments
- Content
View full analysis
0) args.prompt = positional.join(" "); return args; } ``` ```javascript async function main() { const args = parseArgs(process.argv.slice(2)); if (args.help) { printHelp(); process.exit(0); } const tokenFlag = args.token; const TOKEN = tokenFlag; if (!TOKEN) { console.error('\n✗ Token required. Pass via: --token YOUR_TOKEN'); console.error(' Get yours at: https://www.neta.art/open/'); process.exit(1); } ``` The documented invocation directly places the secret on the command line: ```bash node magazinecovergenerator.js "your description here" --token YOUR_TOKEN ``` ### Technical Analysis The Skill requires users to provide the Neta API token through the `--token` command-line argument. Command-line arguments are not an appropriate secret transport mechanism because they may be: - Stored in shell history files. - Visible to local process-inspection utilities while the process runs. - Captured by endpoint monitoring, audit, telemetry, or diagnostic systems. - Included in copied command output, support records, or terminal session logs. The token is subsequently sent as the `x-token` HTTPS header to the ...[truncated 1443 chars]- Remediation
View remediation
