T09 · Insecure Skill Coding Practices
- Location
throughput.py:353- Finding
API Key Accepted Through a Command-Line Argument
- Content
View full analysis
/cmdline`, or system monitoring agents. - Terminal session logging and command auditing. - CI/CD job output or wrapper scripts that print invoked commands. - Diagnostic reports that capture process arguments. The key is legitimately required for direct API benchmarking, and the code does not intentionally transmit it anywhere except the selected endpoint. Nevertheless, accepting it directly through `argv` exposes the credential more broadly than necessary. ### Attack Path 1. A user follows the documented API-mode example and invokes the script with `--key `. 2. The shell records the command in its history, or the operating system exposes the argument in process metadata while the benchmark is running. 3. Another local account, monitoring process, log collector, or later shell-history reader obtains the key. 4. The attacker uses the recovered key directly against the corresponding API provider. 5. The attack ...[truncated 785 chars]- Remediation
View remediation
