T09 · Insecure Skill Coding Practices
- Location
scripts/rate.py:519- Finding
OpenAI API Key Can Be Exposed Through Command-Line Arguments
- Content
View full analysis
/cmdline`, or system monitoring software. - Agent execution transcripts and command logging. - CI/CD logs, terminal recording, and audit systems. - Wrapper scripts that retain the complete invocation. Although the key is not deliberately written into the generated benchmark report, accepting it as a process argument weakens the documentation’s assurance that the credential is never stored or logged. The safer environment-variable path already exists, but the insecure command-line path remains available and may be selected by users or automated instructions. ### Attack Path 1. A user or Agent invokes the benchmark with: ```bash python3 scripts/rate.py --judge openai --api-key sk-sensitive-value ``` 2. The complete command is retained in shell history, an Agent transcript, process metadata, or execution logs. 3. A local user, monitoring process, log reader, or compromised application with access to that data retrieves the API key. 4. The exposed credential is use ...[truncated 820 chars]- Remediation
View remediation
