T09 · Insecure Skill Coding Practices
- Location
SKILL.md:34- Finding
Plaintext API Key Persistence in Shell Profiles and User Environment
- Content
View full analysis
"' >> ~/.bashrc && source ~/.bashrc echo 'export SEARCH_360_API_KEY=""' >> ~/.zshrc && source ~/.zshrc setx SEARCH_360_API_KEY "" ``` ### Technical Analysis The documented setup procedure embeds the API key directly in a command and writes it to a persistent shell profile or the Windows user environment. On Unix-like systems, the literal command may also remain in shell history. The secret can consequently be exposed through profile files, command history, backups, diagnostic collection, or unrelated descendant processes that inherit the environment. The procedure conflicts with the declaration that the Skill does not write to the filesystem. The project manifest also declares only a network side effect and does not disclose persistent credential configuration. Running `source ~/.bashrc` or `source ~/.zshrc` is unnecessary for securely configuring this individual application and executes every command currently present in the profile. Although exploitation requires access to the affected user account, profile, process environment, backup, or history, the instructions unnecessarily increase the API key's exposure. ### Attack Path 1. A user follows the documented setup instructions and substitutes a valid 360 API key into the command. 2. The command persists the key in `.bashrc`, `.zshrc`, or the Windows user environment. The command may also be retained in shell history. 3. A local process, another ...[truncated 854 chars]- Remediation
View remediation
