T02 · Agent Memory Poisoning
- Location
prompts/l3-weekly-prompt.md:104- Finding
Untrusted Conversation Content Can Poison Persistent Agent Rules
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This memory skill is not hidden malware, but it installs recurring jobs that read conversation logs, write long-term memory, and delete session files with weak controls.
Install only if you are comfortable with automatic background jobs reading your OpenClaw session logs, retaining summaries in Markdown memory files, and deleting session files. Before use, require explicit opt-in for each cron task, disable or dry-run GC, review what sessions are scanned, add sensitive-data redaction, and document how to pause or uninstall all jobs.
prompts/l3-weekly-prompt.md:104Untrusted Conversation Content Can Poison Persistent Agent Rules
prompts/install-prompt.md:167Installation Creates Persistent Scheduled Jobs Without Adequate Lifecycle Controls
prompts/gc-cleanup-prompt.md:25GC Decision Order Can Delete Protected or Legitimate Sessions
prompts/l1-hourly-prompt.md:15Hourly Task Reads All Main-Agent Session Logs Beyond the Explicit-Marker Model
prompts/l2-nightly-prompt.md:38Conversation Content Is Persisted Without Sensitive-Data Redaction or Retention Controls
prompts/migrate-prompt.md:39Migration Backup Selection Can Restore Stale Data
The command rm memory/YYYY-MM-DD.md is a destructive filesystem operation embedded in documentation, and it normalizes use of an unsafe tool parameter without safeguards. In skill/troubleshooting contexts, users often copy-paste commands directly, so even a placeholder path can lead to accidental deletion if replaced incorrectly or executed from the wrong repository location.
修复:
# 删除错误文件
rm memory/YYYY-MM-DD.md # 错误日期
# 确保 L2 Prompt 中使用动态日期
TODAY=$(date +%Y-%m-%d)
The GC troubleshooting section recommends bulk find ... -delete operations that can remove multiple files based on broad patterns, again without warnings, dry-run instructions, or recovery guidance. Because the paths are derived from $(pwd) and traverse relative directories, a user running this from an unexpected location could delete unintended session data or other files irreversibly.
The natural-language instructions, command descriptions, and operational guidance are presented in Chinese throughout the file, which effectively forces a specific language for users of the skill. The policy allows locale constraints only when the skill offers language choice or clearly documents a justified region-specific limitation, neither of which appears here.
The skill advertises and schedules automatic Cron-driven writes and a cleanup job that performs physical deletion, but the top-level description does not present a clear user-facing warning about these background modifications. In an agent skill context, unattended persistence and deletion can surprise users, affect unrelated files if paths are misconfigured, and create integrity/privacy risks even without overtly malicious logic.
This prompt directs automated deletion of session files based on broad filename and size heuristics, but it does not require an explicit user-facing warning or confirmation about the impact on stored session history. In an agent context, deleting session artifacts can destroy user data, audit trails, or operational state, and the prompt’s 'safety' language may create false confidence despite the risk of misclassification and irreversible removal.
All required output strings and operational instructions are specified in Chinese, effectively constraining the skill's responses to a single language. The policy says to flag language or locale restrictions unless the skill offers user choice or clearly documents a justified regional constraint, neither of which appears here.
The task description and role instructions are written entirely in Chinese and implicitly require the skill to operate in that language. There is no indication that the user can choose another language or that the Chinese-only constraint is necessary for a region-specific or compliance-bound use case.
The install prompt instructs registration of multiple cron jobs, including an optional heartbeat, creating persistent background tasks on the user's system. Because the prompt does not prominently warn that installation changes scheduled task state and may continue running automatically after setup, users may grant persistence without informed consent, which is a meaningful security and trust risk for an agent skill.
The prompt directs an automated cron-triggered process to overwrite SESSION-STATE.md in the workspace on an hourly basis, but it does not require any explicit user consent, preview, backup, or safety check before modifying user data. In an agent skill context, unattended periodic writes can destroy prior state, propagate bad extraction results, or overwrite manually curated content, especially because the instruction explicitly says to use overwrite semantics.
The prompt content and required confirmation output are written entirely in Chinese and present the behavior as fixed, with no option for the user to choose language or locale. This is a natural-language policy concern because it imposes a specific language without opt-in or documented regional justification.
The prompt explicitly instructs overwriting SESSION-STATE.md so that prior contents are cleared and replaced only with a cursor marker, but it does not require any backup, confirmation, or explicit warning about irreversible data loss. In a memory/archive workflow, this is operationally risky because a failed or partial archive step could destroy active state or silently discard data that may be needed for recovery or auditing.
The skill explicitly instructs appending content to MEMORY.md, which is persistent user data, but provides no warning, confirmation, or safeguard before modifying it. Because the content is derived from multiple weekly files and written automatically, an agent could change long-lived state without the user's informed consent, potentially polluting or corrupting memory over time.
The skill instructions are written entirely in Chinese and direct the agent's behavior in that language, with no opt-in or alternative language path. This can violate language/locale policy when a skill implicitly forces a specific language for all users without documented justification.
The prompt makes a safety claim that migration will 'not overwrite existing files, only append', but later directs generating full replacement content for SESSION-STATE.md and dated memory files. This mismatch can cause an agent or user to trust the operation as non-destructive when it may overwrite curated state or archival files, leading to silent data loss or corruption during migration.
The document specifies automated writes to SESSION-STATE.md, memory/YYYY-MM-DD.md, and MEMORY.md, plus a daily Session GC cleanup step, but provides no user-facing warning, confirmation boundary, backup guidance, or deletion safeguards. In an agent skill, undocumented autonomous modification and cleanup of local files can cause unintended data loss or silent state corruption, especially because the workflow is prompt-driven and may be executed by an LLM without strong operational guardrails.
The optional external todo synchronization describes pulling data from an external source into L1 without any warning about external connectivity, data transfer, trust boundaries, or sensitive data ingestion. In a memory-oriented agent skill, this can silently import untrusted or private external content into persistent memory files, increasing the risk of privacy exposure, prompt injection contamination, or unintended cross-system data flow.
The entire skill document is written as a Chinese-only normative specification, using mandatory language such as “必须” and “禁止”, but it does not state that Chinese is optional, user-selected, or required for a region-specific purpose. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy concern.
The troubleshooting guide includes a direct rm deletion command for a file path without any warning, confirmation step, or backup guidance. Even though the example targets an intentionally 'wrong-date' file, users may substitute the wrong path or run it in the wrong directory context, causing irreversible data loss.
This markdown template presents all operational instructions and examples in Chinese, including the embedded MEMORY.md content and CAR format guidance. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not provided here.
This markdown template uses Chinese instructional text and field descriptions throughout, while presenting only bilingual section headers inside the example content. There is no indication that language selection is optional or that the template is intentionally limited to a Chinese-speaking or region-specific context, which can violate language/locale policy requirements.
This markdown template is written entirely in Chinese, including headings, field descriptions, and usage notes, with no indication that the language is optional or that the template is intended only for a Chinese-language or region-specific context. That creates a natural-language policy concern because it imposes a specific language on users without opt-in.
The migration flow states that old data will be read from backups and appended into new L1/L2/L3 memory files, but it does not clearly warn users that prior data will be re-ingested into persistent stores. This can lead to accidental retention of sensitive or stale information and unexpected propagation of historical content into active agent memory.
SQP-3 applies to all file types and covers language/locale policy violations. The entire prompt, including tasking, instructions, and output examples, is fixed in Chinese with no opt-in or explanation that the skill is intended only for a Chinese-speaking or region-specific environment.
The prompt states that it is automatically triggered by Cron every 30 minutes and later directs the agent to check the existence and freshness of files under the workspace. For markdown files, the guidance requires warnings when behavior could affect user data, privacy, or system integrity; this description does not disclose that it will autonomously inspect local files on a schedule.
The prompt defines the monitored paths as SESSION-STATE.md, MEMORY.md, and the memory/ directory, and the checklist explicitly says to verify that memory/ exists. However, the error-handling row at L74 says to report that the 'sessions' directory does not exist, which conflicts with the stated check target and could misdirect the agent's reporting.