other
- Location
SKILL.md:180- Finding
Destructive cleanup guidance can delete persistent memory files
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:180
Vulnerability Type: Destructive File Deletion
Risk Level: MediumVulnerable Code
bash find ~/.openclaw/workspace/memory -name "2026-*.md" -mtime +30 -deleteTechnical Analysis
The Skill recommends recursively deleting every Markdown file under
~/.openclaw/workspace/memorywhose name matches2026-*.mdand whose modification time exceeds 30 days. The command does not verify that matched files are disposable logs, does not provide a dry run, does not request confirmation, and does not create a backup.The target directory may contain persistent Agent memory, generated reports, or unrelated Markdown records. The filename pattern is insufficient to distinguish temporary logs from valuable state. This destructive operation is also inconsistent with the Skill's claims that it performs read-only analysis and does not modify other files.
Although the analyzer script does not automatically execute this command, a user or Agent following the Skill's documented optimization procedure could run it directly.
Attack Path
- A user or Agent loads the Skill and follows its context-optimization guidance.
- The documented
findcommand is executed in the user's environment. findrecursively searches the complete OpenClaw memory directory.- Every file matching
2026-*.mdand older than 30 days is deleted without confirmation. - Persistent memory or unrelated records matching those conditions are irreversibly lost unless an external backup exists.
Impact Assessment
The command runs with the invoking user's filesystem privileges. It can delete any matching file beneath the user's OpenClaw memory directory, including long-term Agent state and unrelated Markdown records. It does not provide broader privilege escalation, network access, or deletion outside the specified directory, but the resulting loss of persistent state may affect future Agent sessions and stored operat ...[truncated 14 chars]
- Remediation
View remediation
Remediation Suggestions
Remove the destructive command from the Skill documentation. If cleanup functionality is required:
- Restrict it to a dedicated, documented disposable-log directory.
- Identify files using validated metadata rather than a broad filename pattern.
- Display candidates first with a non-destructive command:
bash find ~/.openclaw/workspace/memory/conversations \ -type f -name "*.jsonl" -mtime +30 -print - Require explicit user confirmation before deletion.
- Exclude persistent memory and report files by construction.
- Recommend creating a backup or moving candidates to a quarantine directory before permanent deletion.
- Update the read-only security claims if destructive maintenance remains part of the documented workflow.
