T09 · Insecure Skill Coding Practices
- Location
templates/triage-checklist.md:48- Finding
Diagnostic commands disclose plaintext API keys from multiple credential stores
- Content
View full analysis
&1 | grep -iE "API_KEY|HERMES_HOME" env | grep -iE "API_KEY|HERMES" | head -10 cat "$HOME_DIR/auth.json" | python -c "import sys,json; d=json.load(sys.stdin); print(list(d['credential_pool'].keys()))" grep -E "^[A-Z_]+_API_KEY=" "$HOME_DIR/.env" grep -E "api_key|provider|base_url" "$HOME_DIR/config.yaml" | head -20 ``` ### Technical Analysis The triage procedure prints complete API-key assignments from the Windows user registry, current process environment, `.env`, and potentially `config.yaml`. The output is not redacted and is broader than necessary because it enumerates every matching API key rather than checking only whether the affected provider has a configured credential. Although access to credential configuration is relevant to authentication troubleshooting, displaying the secret values is unnecessary. The Agent generally only needs the variable name, whether it is set, its source, and possibly a non-reversible fingerprint. The output may be captured by: - Agent conversation context and execution transcripts - Terminal scrollback or session recording - CI and diagnostic logs - Remote support sessions - Screenshots or copied troubleshooting reports - Other processes or users with access to retained logs ### Attack Path 1. A user invokes the Skill to investigate an authentication failure. 2. The Skill directs the Agent to execute the mandatory triage checklist. 3. The registry, shell environment, `.env`, and configuration searches print plaintext API keys. 4. The command output becomes part of the Agent context or terminal transcript. 5. A log reader, support recipient, local user, or compromised integration retrieves the exposed credentials. 6. The credentials are used to access the corresponding model providers ...[truncated 513 chars]- Remediation
View remediation
