T09 · Insecure Skill Coding Practices
- Location
SKILL.md:37- Finding
API and application secrets exposed through command-line arguments
- Content
View full analysis
'export NVM_DIR=/root/.nvm; . "$NVM_DIR/nvm.sh"; openclaw config set "models.providers.<名称>" --json "{ \"baseUrl\": \"<代理地址>\", \"apiKey\": \"\", \"api\": \"anthropic-messages\", \"models\": [{ \"id\": \"claude-sonnet-4-6\", \"name\": \"Claude Sonnet 4.6\", \"reasoning\": true, \"input\": [\"text\", \"image\"], \"contextWindow\": 200000, \"maxTokens\": 32000 }] }"' ``` ```bash ssh root@ 'export NVM_DIR=/root/.nvm; . "$NVM_DIR/nvm.sh"; openclaw config set "channels.feishu" --json "{ \"enabled\": true, \"domain\": \"feishu\", \"groupPolicy\": \"open\", \"appId\": \"\", \"appSecret\": \"\" }"' ``` ### Technical Analysis The documented commands place an AI provider API key and a Feishu application secret directly inside SSH command-line arguments. After users replace the placeholders, the complete secrets can be exposed through: - Local shell history. - Terminal session recording and clipboard history. - CI/CD or automation logs that echo commands. - Operating-system process inspection while the command is running. - SSH wrappers, auditing systems, or administrative session logs. - Persisted OpenClaw configuration if its file permissions are overly broad. Quoting the remote command does not remove this risk. The initiating shell still receives and may record the complete command, and the SSH client receives the remote command as an argument. ### Attack Path 1. An administrator replaces the placeholders with a valid provider API key or Feishu application secret. 2. The administrator executes the documented SSH command. 3. The command is retained in shell history, a session transcript, an automation log, or process metadata. 4. An attacker with read acc ...[truncated 793 chars]- Remediation
View remediation
