T09 · Insecure Skill Coding Practices
- Location
scripts/backup.sh:5- Finding
Sensitive credential backups are created without enforced access restrictions
- Content
View full analysis
/dev/null ``` The documented backup contents confirm that the archive includes high-value secrets: ```markdown - `credentials/` — API keys, tokens - `agents/` — agent configs, auth profiles - `workspace/` — memory, SOUL.md, user files - `telegram/` — session data - `cron/` — scheduled tasks ``` ### Technical Analysis The script archives the complete `~/.openclaw` directory, including credentials, authentication profiles, session data, private workspace content, and scheduled-task definitions. The resulting archive is not encrypted. More importantly, the script does not establish a restrictive `umask`, assign mode `0700` to the backup directory, or assign mode `0600` to the resulting archive. Consequently, permissions depend on the invoking process's umask and any existing permissions on the user-supplied backup directory. With a common permissive umask such as `022`, the archive may be created as readable by other local users. The optional destination argument also permits backups to be written into an existing shared or otherwise insufficiently protected directory without validation or warning. ### Attack Path 1. A victim invokes `scripts/backup.sh`, optionally specifying a shared or permissively accessible backup directory. 2. The script creates a compressed archive containing API keys, tokens, authentication profiles, Telegram session data, private workspace files, and cron definitions. 3. Because no restrictive permissions are ...[truncated 1062 chars]- Remediation
View remediation
