T09 · Insecure Skill Coding Practices
- Location
GETTING_STARTED.md:395- Finding
Credential Troubleshooting Command Exposes SQL Passwords
- Content
View full analysis
_PASSWORD` - SQL authentication usernames - Internal and cloud database endpoints Consequently, following this instruction can print plaintext database passwords directly to the terminal. In an agent-operated environment, command output may also be copied into the agent context, execution logs, support tickets, chat transcripts, or diagnostic reports. The server-only command at line 162 is narrower and does not expose passwords, but the unrestricted command at line 395 exceeds what is necessary to verify whether required variables exist. ### Attack Path 1. A database connection fails or appears unavailable. 2. An operator or agent follows the documented troubleshooting procedure. 3. The command `grep SQL_ ~/.openclaw/workspace/.env` reads every SQL configuration entry. 4. Plaintext SQL passwords and usernames are printed to standard output. 5. Terminal capture, agent logging, command transcripts, or copied diagnostic output retains the secrets. 6. A party with access to that output authenticates to the configured SQL Server using the exposed account. ### Impact Assessment An attacker obtaining the output can acquire the privileges assigned to the exposed SQL account. Depending on database-side permissions, this may permit: - Reading confidential tables and records - Inserting or modifying application data - Deleting records - Executing stored procedures - Accessing other schemas available to the SQL principal The impact is limited by the ...[truncated 174 chars]- Remediation
View remediation
