T09 · Insecure Skill Coding Practices
- Location
scripts/generate_and_return.py:63- Finding
OpenRouter API Key Exposure Through Command-Line Arguments
- Content
View full analysis
/cmdline`. - Shell history. - Agent execution logs and telemetry. - Process-monitoring and debugging tools. - Error reports that record the invoked command. This behavior is not required for the declared image-generation functionality because the implementation already supports obtaining the credential from the `OPENROUTER_KEY` environment variable. No evidence indicates that the key is intentionally transmitted anywhere except the documented OpenRouter endpoint. The vulnerability is the unnecessary local exposure of the credential before that legitimate transmission. ### Attack Path 1. A user or Agent invokes the Skill with `--api-key `, as supported by the documentation. 2. `generate_and_return.py` places the plaintext key in the child process argument list. 3. A local user, process monitor, execution logger, or telemetry service records or ...[truncated 789 chars]- Remediation
View remediation
