T09 · Insecure Skill Coding Practices
- Location
isekaicharactergenerator.js:26- Finding
API Token Exposed Through Command-Line Arguments
- Content
View full analysis
Vulnerability Details
File Location:
isekaicharactergenerator.js:26-27,isekaicharactergenerator.js:51-61,SKILL.md:17-21,README.md:60-75
Vulnerability Type: Sensitive credential exposure through process arguments and shell history
Risk Level: MediumVulnerable Code
javascript } else if (a === '--token') { tokenFlag = args[++i]; }The captured token is subsequently placed in the authentication header:
javascript const res = await fetch('https://api.talesofai.com/v3/make_image', { method: 'POST', headers: { 'x-token': token, 'x-platform': 'nieta-app/web', 'content-type': 'application/json', }, body: JSON.stringify(body), });The documented invocation explicitly places the secret on the command line:
bash node isekaicharactergenerator.js "your prompt" --token YOUR_TOKENTechnical Analysis
The Skill requires users to provide the Neta API token through the
--tokencommand-line argument. Command-line arguments are not an appropriate secret transport mechanism because they may be exposed through:- Shell history files.
- Process inspection tools while the command is running.
- Process monitoring and endpoint telemetry.
- CI/CD logs or verbose task-runner output.
- Copied terminal commands and support diagnostics.
The token's transmission as an
x-tokenheader over HTTPS to the documentedapi.talesofai.comservice is consistent with the Skill's image-generation functionality. The unnecessary risk is the local command-line handling of that token, not its authenticated transmission to the declared service.The program also sends the user-provided prompt and optional reference UUID to the same external service. This is necessary for remote image generation and is disclosed in the documentation, although users should understand that this content leaves the local system.
Attack Path
- A victim follows the d ...[truncated 1266 chars]
- Remediation
View remediation
Remediation Suggestions
- Read the token from a dedicated environment variable such as
NETA_TOKENinstead of requiring--token. - Support protected standard-input entry for interactive use, with terminal echo disabled where practical.
- Deprecate and eventually remove the command-line token option.
- If backward compatibility requires temporary
--tokensupport, display a warning explaining that process arguments and shell history may expose the token. - Never include the token in errors, debug output, telemetry, or generated URLs.
- Update all examples to use a safer pattern:
bash export NETA_TOKEN="your-token" node isekaicharactergenerator.js "your prompt"- Document token rotation and immediate revocation procedures for potentially exposed credentials.
- Add a concise privacy notice explaining that prompts and optional reference UUIDs are transmitted to
api.talesofai.com.
- Read the token from a dedicated environment variable such as
