T09 · Insecure Skill Coding Practices
- Location
SKILL.md:334- Finding
Plaintext Disclosure of Cloud API Credentials During Troubleshooting
- Content
View full analysis
.env chmod 600 .env ``` ### Technical Analysis The troubleshooting procedure prints the complete `.env` file using `cat`. This file is explicitly documented as containing OpenAI, Azure, Aliyun, or Tencent cloud credentials. Although file permissions are later set to mode `600`, those permissions only control direct filesystem access. They do not prevent disclosure after the file is printed. Its contents may become visible through: - Agent tool output and conversation context - Terminal recording or command-output capture - CI/CD and diagnostic logs - Screen sharing or shoulder surfing - Monitoring systems that retain process output Displaying secret values is not required to determine whether a provider is configured. The Skill could verify the presence of expected variable names or perform an authentication test without exposing their values. Consequently, this behavior exceeds the minimum access necessary for troubleshooting. ### Attack Path 1. A user stores valid cloud credentials in `~/openclaw-video-generator/.env`. 2. Video generation fails because of an unrelated configuration or provider error. 3. The Agent follows the documented troubleshooting procedure and executes `cat ~/openclaw-video-generator/.env`. 4. The complete credentials are returned in terminal or Agent tool output. 5. An individual or system with access to the captured output retrieves the credentials. 6. The exposed credentials are reused to invoke cloud APIs or access resources allowed by their assigned permissions. ### Impact Assessment An attacker could obtain the authority granted to the exposed provider credentials. Potential impact includes: - Unauthorized TTS or ...[truncated 418 chars]- Remediation
View remediation
