T09 · Insecure Skill Coding Practices
- Location
scripts/backup.sh:5- Finding
Sensitive backup archives are created without restrictive permissions
- Content
View full analysis
/dev/null ``` ### Technical Analysis The backup includes the complete `.openclaw` directory, which the project documentation identifies as containing API keys, authentication profiles, Telegram sessions, scheduled tasks, configuration, memory, and user files. The script does not establish a restrictive `umask` and does not explicitly set permissions on either the backup directory or the resulting archive. Consequently, permissions depend on the invoking process's environment. Under a common `umask 022`, the directory may be created with mode `0755`, while the archive may be created with mode `0644`. Compression does not provide confidentiality. Any local account able to read the archive can extract its sensitive contents. ### Attack Path 1. A user invokes `scripts/backup.sh` with a permissive or ordinary `umask`, such as `022`. 2. `mkdir` and `tar` create the destination and archive without explicit restrictive permissions. 3. The resulting archive is readable by other local accounts if its effective mode is `0644`. 4. Another local user locates the archive under the default or supplied backup directory. 5. That user copies or extracts the archive and obtains credentials, tokens, session data, agent configuration, memory, and scheduled-task definitions. ### Impact Assessment Exploitation requires local read access resulting from the archive's effective permissions or access through another service that exposes the backup directory. A successful a ...[truncated 375 chars]- Remediation
View remediation
