T09 · Insecure Skill Coding Practices
- Location
scripts/backup-openclaw-to-nutstore.sh:22- Finding
Documented sensitive-file exclusions are not enforced during backup
- Content
View full analysis
$dst" "$RCLONE_BIN" sync "$src" "$dst" "${extra_args[@]}" else echo "[skip] directory not found: $src" fi } ``` ```bash src="$agent_root/$rel_path" if [ -d "$src" ]; then sync_dir "$src" "$remote_agent_root/$rel_path" elif [ -f "$src" ]; then remote_dir="$(dirname "$rel_path")" if [ "$remote_dir" = "." ]; then remote_file="$remote_agent_root/$rel_path" else remote_file="$remote_agent_root/$remote_dir/$(basename "$rel_path")" fi copy_file_to "$src" "$remote_file" ``` ```bash for file in "${IDENTITY_FILES[@]}"; do copy_file "$agent_root/$file" "$remote_agent_root/identity" done sync_dir "$agent_root/memory" "$remote_agent_root/memory" ``` The behavior conflicts with the exclusion rules documented in `SKILL.md:172-182` and `references/storage-scope.md:86-95`, which state that paths such as `secrets`, `cookies`, `.secret.key`, virtual environments, `node_modules`, and temporary directories are excluded. ### Technical Analysis Every directory backup invokes `rclone sync` without an `--exclude`, `--filter`, or `--filter-from` option. Custom file backups similarly use `copyto` without first rejecting sensitive file names or sensitive parent directories. As a result, the documented exclusions are descriptive only and have no enforcement in the executable implementation. Sensitive content is uploaded whenever it appears beneath the default `memory` directory or beneath a directory selected through `CUSTOM_BACKUP_PATHS`. A sensitive file can also be selected directly in custom mode. Because the destination ...[truncated 1632 chars]- Remediation
View remediation
