T09 · Insecure Skill Coding Practices
- Location
scripts/one-click-full-backup.sh:97- Finding
Disaster backup stores authentication secrets in an unencrypted archive without restrictive permissions
- Content
View full analysis
/dev/null if [ -f "$OUTPUT_FILE" ]; then SIZE=$(ls -lh "$OUTPUT_FILE" | awk '{print $5}') MD5=$(md5sum "$OUTPUT_FILE" | awk '{print $1}') fi ``` ### Technical Analysis The full-backup feature intentionally collects `openclaw.json`, `.env`, and Agent authentication configuration. The documentation confirms that these files can contain gateway tokens and other credentials. The final artifact is compressed but not encrypted. Compression provides no confidentiality. The script also does not establish a restrictive `umask`, explicitly apply mode `0600`, or verify that the destination is private. Consequently, the resulting archive can inherit permissions that make it readable by unintended local users or services. The generated MD5 value does not protect authenticity and is not a confidentiality control. It cannot prevent an attacker from reading the archive or replacing both the archive and its displayed checksum. Collecting these files is relevant to the declared disaster-recovery functionality, so the access itself doe ...[truncated 1348 chars]- Remediation
View remediation
