T09 · Insecure Skill Coding Practices
Warning
- Location
- openclaw.md:40
- Finding
- Credential Directory Backups Lack Mandatory Security Controls## Vulnerability Details **File Location**: `openclaw.md`, lines 40–48 **Vulnerability Type**: Sensitive credential exposure through insufficiently protected backups **Risk Level**: Medium ### Vulnerable Code ```markdown ## Optional Backup Scope Offer, but do not assume: - `~/.openclaw/workspace/` - `~/.openclaw/credentials/` These can be larger or more sensitive, so the user should decide explicitly. ``` ### Technical Analysis The skill permits the entire `~/.openclaw/credentials/` directory to be included in a backup after explicit user approval. Although this behavior is optional and there is no instruction to transmit credentials externally, the backup contract does not require: - Encryption at rest - A trusted local destination - Restrictive directory and file permissions - Symbolic-link and path-traversal protections - Exclusion of unnecessary credential files - Post-copy permission verification - A defined retention and secure-deletion policy Copying credentials creates additional long-lived instances of authentication material and therefore expands the exposure surface beyond the minimum privileges needed to update OpenClaw. User consent alone does not ensure that the backup destination or implementation is secure. ### Attack Path 1. The user explicitly enables the optional credential-directory backup. 2. A scheduled update copies `~/.openclaw/credentials/` to a backup destination. 3. The destination has permissive access rights, is synchronized to another service, or resolves through an unsafe symbolic link. 4. Another local user, process, synchronization recipient, or later system intruder accesses the copied files. 5. Any reusable tokens or credentials in the backup are used to access the corresponding services with the victim's privileges. This path depends on an insecure backup destination or implementation; the reviewed documentation does not itself perform exfiltration. ### Impact Assessment An attacker could obtain authentication ma ...[truncated 521 chars]
- Remediation
- ## Remediation Suggestions - Exclude `~/.openclaw/credentials/` from the standard and recommended backup scopes. - Permit credential backups only when the user identifies a concrete recovery requirement and separately approves the destination. - Prefer exporting only the minimum required recoverable material rather than copying the entire directory. - Require an encrypted local backup destination under the user's control. - Create backup directories with mode `0700` and credential files with mode `0600` on platforms that support POSIX permissions. - Reject symbolic links and verify that the canonical destination remains inside the approved backup root. - Avoid cloud-synchronized, shared, temporary, or world-readable destinations unless the user explicitly accepts the documented risk. - Verify ownership, permissions, encryption status, and backup integrity after the copy. - Do not record secret contents in `backups.md`, `run-log.md`, or other ledgers; record only sanitized paths and metadata. - Establish explicit retention and secure-deletion rules for credential-bearing backups. - Warn the user that copied credentials may remain valid after the primary configuration changes, and recommend credential rotation following suspected backup exposure.
