T06 · System Persistence
- Location
SKILL.md:114- Finding
Recurring Agent Task Creates Cross-Session Persistence
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This memory backup skill is mostly purpose-aligned, but it creates recurring agent runs and writes raw conversation-derived content into persistent memory while overstating its safety.
Review this skill before installing or enabling its cron job. It does not show network exfiltration or hidden remote payloads, but it will process sensitive OpenClaw memory, append selected lines into long-term MEMORY.md, move source files into backups, and may run every day if the cron command is added. Install only if you are comfortable with automatic memory promotion, and consider adding review, deletion, cron removal, symlink-safe path checks, and clearer timezone/language configuration first.
SKILL.md:114Recurring Agent Task Creates Cross-Session Persistence
memory_backup.py:147Conversation Content Is Copied Verbatim into Persistent Agent Memory
memory_backup.py:121Symlink Following Can Redirect Persistent Writes and Backup Moves Outside the Workspace
This second mismatch finding is also valid: the skill presents itself as a memory-processing feature, but the visible content indicates a generic wrapper entrypoint that may launch external code via python/script dispatch without declaring that execution model. Hidden indirection through wrapper scripts increases risk because the real logic and side effects may exist outside the reviewed file.
This second mismatch finding is also valid: the skill presents itself as a memory-processing feature, but the visible content indicates a generic wrapper entrypoint that may launch external code via python/script dispatch without declaring that execution model. Hidden indirection through wrapper scripts increases risk because the real logic and side effects may exist outside the reviewed file.
The skill documentation presents the skill entirely in Chinese and labels it with a Chinese title, while the scheduled configuration later hard-codes the Asia/Shanghai timezone. There is no indication that users may choose another language or locale, nor any explanation that the skill is intended only for a China-specific environment.
The README describes an automated daily job that reads prior memory files, appends extracted content into a long-term memory file, and creates backups, but it does not present this as a clear user-facing privacy/data-handling warning. Because the data involved is memory content, the lack of explicit disclosure and consent can cause silent collection, retention, and duplication of potentially sensitive information.
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
ls -la ~/.openclaw/workspace/backup/memory/
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
ls -la ~/.openclaw/workspace/backup/memory/
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
ls -la ~/.openclaw/workspace/backup/memory/
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
ls -la ~/.openclaw/workspace/backup/memory/
Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.
ls -la ~/.openclaw/workspace/backup/memory/
The skill declares no explicit tool scope or permissions, yet its documentation describes capabilities equivalent to reading files, writing files, and invoking scripts via shell/python execution. This creates an authorization and review gap: operators cannot accurately assess what the skill is allowed to do, and a wrapper script could perform broader actions than users expect.
The skill description and all user-facing documentation are written exclusively in Chinese, including operational instructions and example output. This imposes a specific language/locale on users without any stated opt-in, fallback, or note that the skill is intended only for a Chinese-speaking or China-region context.
The security claims are inaccurate: the script says all file operations are restricted to the workspace, but it writes to MEMORY.md in create_memory_md() and append_to_memory_md() before any explicit path validation. Because WORKSPACE_ROOT is derived from the current user's home directory and then trusted globally, a manipulated environment, symlinked path, or unexpected filesystem layout could cause reads or writes outside the intended workspace boundary, making the documented safety guarantee unreliable.
The skill description says '自动压缩备份' (automatic compressed backup), which implies creating a compressed archive or compacted backup artifact. The implementation in backup_file() merely renames the original markdown file into a backup folder, with no compression logic at all.
The package description is written only in Chinese ("每日记忆自动压缩备份和关键点提取"), which imposes a specific language for understanding the skill metadata. The file does not indicate that language choice is optional or that the skill is intended only for a Chinese-speaking or region-specific audience.
The docstring states that the wrapper 'does not include ... subprocess' and 'does not perform dangerous operations,' yet the module imports subprocess and later uses subprocess.run to launch memory_backup.py. This is an active contradiction between the inline security description and the implementation, not merely an omitted detail.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
try:
# 执行目标脚本
result = subprocess.run(
[sys.executable or "python3", SCRIPT_PATH],
capture_output=True,
text=True,
The cron configuration fixes the locale-sensitive timezone to Asia/Shanghai, which can violate language/locale policy when presented as the default behavior without offering alternatives. The README does not explain that the skill is limited to that region or tell users to adjust the timezone to their own locale.
This Python file includes its main docstring and operational messages primarily in Chinese, and does not indicate any user option to select another language. That can violate a language/locale policy when a skill is expected to avoid forcing a specific language without user opt-in.
The documentation minimizes the wrapper as 'only an entry point,' but the code performs process execution control, timeout handling, working-directory selection, and output forwarding. While related to wrapping, the documentation's safety framing understates these concrete side effects and execution capabilities.