T09 · Insecure Skill Coding Practices
- Location
SKILL.md:59- Finding
API Key Exposed Through Command-Line Arguments
- Content
View full analysis
`. ``` The original instruction explicitly requires the API key to be substituted into the command-line argument. ### Technical Analysis Passing a secret directly as a command-line argument can expose it through several operating-system and execution-layer channels: - Interactive shell history files. - Process-listing utilities while the command is running. - Terminal session recordings. - Agent tool-call logs and execution traces. - CI/CD, debugging, or command-auditing systems that record complete arguments. - Error reports that capture the invoked command. Although the key is needed to configure the legitimate YoudaoNote client, placing it directly in the argument vector does not provide adequate protection for credential material. The documentation also does not require redaction, secure prompting, log suppression, or subsequent credential rotation. ### Attack Path 1. A user follows the Skill instruction and runs `youdaonote config set apiKey `. 2. The plaintext key is stored in shell history, captured in an Agent execution trace, or temporarily exposed through the process argument list. 3. An attacker with access to the same host, execution logs, terminal history, or monitoring system retrieves the key. 4. The attacker configures a YoudaoNote client or directly accesses supported APIs with the stolen credential. 5. The attacker can access or modify cloud-note data to the extent permitted by that API key. ### Impact Assessment Successful exploitation can compromise the confidentiality and integrity of the vic ...[truncated 329 chars]- Remediation
View remediation
