T09 · Insecure Skill Coding Practices
Note
- Location
- SKILL.md:727
- Finding
- Automatic Plaintext Retention of Potentially Sensitive User Conversations## Vulnerability Details **File Location**: `SKILL.md`, lines 33-57 and line 727 **Vulnerability Type**: Automatic storage of potentially sensitive data in plaintext **Risk Level**: Low ### Vulnerable Code ```markdown ## First Run Setup On first message, create data directory: ```bash mkdir -p ~/.openclaw/problem-solver ``` Initialize files: ```json // ~/.openclaw/problem-solver/settings.json { "problems_solved": 0, "frameworks_used": 0, "decisions_made": 0, "streak_days": 0, "last_used": null } ``` ```json // ~/.openclaw/problem-solver/history.json [] ``` ```json // ~/.openclaw/problem-solver/saved.json [] ``` ``` The automatic logging instruction appears at line 727: ```markdown Auto-log every problem solved to `history.json`: ``` ### Technical Analysis The Skill is intended to process personal, business, and technical problems and instructs the agent to automatically log every solved problem to `~/.openclaw/problem-solver/history.json`. These records may contain confidential business information, personal decisions, technical details, or secrets accidentally included in debugging conversations. The storage design does not specify: - Per-entry user consent or an option to disable history logging. - Redaction of credentials, tokens, personal data, or other sensitive values. - Restrictive directory and file permissions. - Encryption at rest. - A retention period or automatic deletion policy. - Secure deletion and history-management procedures. Although the file is stored locally and no external transmission was identified, plaintext records can be read by processes operating under the same user account, malware with local access, backup or synchronization utilities, or other principals with sufficient filesystem permissions. ### Attack Path 1. A user asks the Skill to solve a sensitive personal, business, or technical problem. 2. The conversat ...[truncated 1174 chars]
- Remediation
- ## Remediation Suggestions 1. Make history logging opt-in rather than automatic, and clearly explain what information will be retained. 2. Request explicit confirmation before storing each problem or solution. 3. Detect and redact credentials, API tokens, private keys, personal identifiers, and other sensitive values before writing records. 4. Create the directory and files with restrictive permissions, such as owner-only access, and verify permissions before every write. 5. Store only the minimum information required for history and progress features rather than complete problem descriptions. 6. Add configurable retention limits based on both record count and age. 7. Provide commands to inspect, selectively delete, disable, and securely clear stored history. 8. Consider encryption at rest where the runtime provides an appropriate platform-backed secret store. 9. Warn users not to include credentials or highly sensitive information in content that may be saved. 10. Document how local backup, synchronization, and multi-user environments can affect the confidentiality of stored records.
