T09 · Insecure Skill Coding Practices
- Location
SKILL.md:53- Finding
Unsafe API Key Disclosure and Persistent Plaintext Storage
- Content
View full analysis
` writes it to the user environment, followed by `export ZXT_API_KEY=` for the current session. - macOS/Linux: append `export ZXT_API_KEY=` to `~/.bashrc` or `~/.zshrc`, depending on the shell, and execute `export ZXT_API_KEY=` for the current session. ``` The snippet above is an English rendering of the instructions at the cited location. The original commands and placeholder syntax are preserved. ### Technical Analysis The Skill instructs users to send an authentication secret through the conversation and then persist that secret in plaintext using `setx` or a shell startup file. This exceeds the minimum privileges required for invoice deduplication. The implementation already supports a process-scoped `ZXT_API_KEY` environment variable and a `--api-key` argument, so permanent modification of user configuration is unnecessary. Conversation content may be retained in agent histories, telemetry, debugging logs, or support exports. Shell startup files are also commonly readable by applications running as the same user and may be copied into backups or configuration repositories. The documented commands interpolate `` without demonstrating safe shell quoting. If an agent substitutes attacker-controlled content directly into a shell command, shell metacharacters in the supplied value could potentially introduce additional commands. ### Attack Path 1. A user is instructed to provide the API key directly through the conversation. 2. The cr ...[truncated 1249 chars]- Remediation
View remediation
