T09 · Insecure Skill Coding Practices
- Location
SKILL.md:112- Finding
Persistent Storage of CDP Credentials in a Plaintext Shell Startup File
- Content
View full analysis
"验证成功了,帮我把这三个 CDP 变量写到 ~/.zshrc 里保存起来。" The agent will append: ```bash export CDP_API_KEY_ID="..." export CDP_API_KEY_SECRET="..." export CDP_WALLET_SECRET="..." ``` ``` ### Technical Analysis The Skill explicitly instructs the agent to persist the CDP API key secret and wallet secret in `~/.zshrc`. Shell startup files are plaintext files intended for shell configuration, not secret storage. They may be exposed through backups, support bundles, accidental repository commits, shell-configuration synchronization, permissive file permissions, or local processes running under the same account. Persisting these credentials also increases their lifetime and exposure beyond the immediate Xenodia operation. The CDP credentials permit access to Coinbase CDP services, while the wallet secret is associated with managed-wallet operations. This is broader and more sensitive than the minimum privilege required for a one-time balance check or authentication attempt. ### Attack Path 1. The owner follows the Skill instruction and writes the three CDP values to `~/.zshrc`. 2. A local process, compromised utility, backup service, synchronization tool, or user with sufficient filesystem access reads the startup file. 3. The attacker extracts `CDP_API_KEY_ID`, `CDP_API_KEY_SECRET`, and `CDP_WALLET_SECRET`. 4. The attacker initializes a CDP client using the stolen credentials. 5. Subject to the permissions assigned to the CDP API key and wallet, the attacker performs unauthorized API or wallet-signing operations. ### Impact Assessment Successful exploitation can di ...[truncated 404 chars]- Remediation
View remediation
