T02 · Agent Memory Poisoning
- Location
scripts/learner.py:5- Finding
Persistent Agent Memory Poisoning Through Unvalidated Notes and Preferences
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill needs Review because it asks agents to keep persistent learning data and potentially update its own instructions, while its claimed research safeguards are not actually present in the artifact.
Install only after reviewing the learner behavior. Do not allow it to store sensitive task content or automatically rewrite SKILL.md, and treat its self-verification, orchestration, and self-evolution claims as unimplemented unless those referenced tools are separately supplied and reviewed.
scripts/learner.py:5Persistent Agent Memory Poisoning Through Unvalidated Notes and Preferences
scripts/learner.py:20Documented Learner Commands Are Silently Misparsed and Corrupt Persistent State
The skill claims advanced self-verification, self-reflection, orchestration, and continuous self-evolution, but the documented behavior is largely limited to local logging and preference storage. This mismatch is security-relevant because operators may overtrust outputs, assume safeguards exist when they do not, and permit broader autonomy or lower human review based on inaccurate capability claims.
The skill documents file-writing behavior via scripts/learner.py and persistent memory files, but it does not declare any permissions or allowed-tools scope. This creates an authorization/transparency gap: a caller or platform may not realize the skill persists data, increasing the chance of unintended writes and policy bypass in environments that rely on manifest-declared capability boundaries.
The skill is presented as a research enhancement tool, but the documentation adds automatic persistent personalization and behavior shaping across sessions. This scope expansion can mislead users about what data is being retained and how future behavior is influenced, undermining informed consent and increasing the likelihood of covert profile building.
The skill introduces persistent storage of user preferences, usage counts, and error patterns beyond the stated research/orchestration purpose. This is a data minimization issue: collecting generalized behavioral telemetry without necessity expands the privacy and security attack surface and can retain sensitive user information unrelated to the task.
The skill describes automatic storage of user preferences and usage history but provides no clear privacy notice, consent flow, or retention/deletion guidance. In practice, users may disclose sensitive information in notes, errors, or preferences that then persist locally without their awareness, creating avoidable privacy and compliance risk.
The skill explicitly establishes a persistent retention mechanism for user preferences, error history, and usage patterns in learned_patterns.json across uses. Persistent natural-language memory is risky because free-form notes can accumulate personal, proprietary, or sensitive operational details, and long-lived local storage broadens exposure in case of later compromise or unintended reuse.
The example command stores 输出语言 --val 中文 as a direct preference, and the document does not offer alternative language choices or say this is only an example requiring user opt-in. This can be read as a default locale/language constraint, which violates the policy against forcing a specific language without user choice.
The only natural-language description in the file is written in Chinese, which can indicate a fixed language expectation without user opt-in or multilingual accommodation. The policy requires flagging language or locale constraints when the skill does not explicitly offer a choice or justify the restriction.
The entire document is written in Chinese, including headings and operational descriptions, with no indication that language choice is optional or that the skill is intentionally limited to a Chinese-speaking context. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.
This code writes persisted data to a local JSON file via json.dump, but there is no confirmation prompt, print/log disclosure before the write, or inline comment/docstring explaining that invocation notes will be stored on disk. For a code file, persistent file writes should have some visible disclosure unless clearly covered elsewhere.