T02 · Agent Memory Poisoning
- Location
scripts/learner.py:10- Finding
Unvalidated Attacker-Controlled Data Is Written to Persistent Agent Memory
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is not overtly malicious, but it asks for persistent learning and self-modification authority that is broader and less controlled than a robustness-testing helper needs.
Review this skill carefully before installing. It should be limited to explicit, user-approved writes to learned_patterns.json, and any proposed changes to SKILL.md should be generated as a reviewed patch rather than applied automatically. Avoid feeding it sensitive prompts or private evaluation details until memory retention, deletion, and trust-labeling behavior are clarified.
scripts/learner.py:10Unvalidated Attacker-Controlled Data Is Written to Persistent Agent Memory
scripts/learner.py:18Documented Learner Commands Are Silently Misinterpreted by the CLI
The description claims a broad, advanced meta-skill with capabilities such as self-verification, self-reflection, orchestration, and iterative self-improvement beyond a teacher skill. The provided code does not implement those behaviors. It only reads and writes a local JSON file to record invocation counts, failure counts, and notes. While this could be a supporting component for a larger meta-evolution loop, the supplied chunk’s actual primary purpose is persistent logging/record-keeping, which is materially narrower than the declared skill behavior.
The skill documents behaviors that imply file-writing and persistent state changes, but it declares no explicit tool scope or permissions boundary. This creates a capability-transparency problem: a caller may invoke the skill without realizing it can write memory files or potentially modify artifacts, increasing the risk of unauthorized persistence or state tampering.
The natural-language content of the skill, including its description and operating instructions, is presented in Chinese only. This effectively forces a specific language without user opt-in or any explanation that the skill is intended for a Chinese-only audience.
The skill stores user preferences, evaluation history, and accumulated patterns across sessions even though that persistence is not clearly necessary for a robustness-analysis function. Cross-session memory can expose sensitive operational data, create profiling risk, and be reused in later contexts without the user's informed consent.
The skill describes automatic persistence of evaluation history and user preferences without an explicit privacy notice, consent flow, or retention policy. That can lead to covert data retention of potentially sensitive prompts, decisions, and operator habits, which is especially risky in multi-user or shared environments.
The skill explicitly contemplates writing back to its own SKILL.md as part of self-evolution, which crosses from analysis into self-modification. Self-modifying agent artifacts are dangerous because they can silently expand behavior, bypass review, and persist unsafe or poisoned instructions across future runs.
The module docstring is written as a fixed Chinese-language description, indicating a locale-specific presentation without offering user choice or explaining a region-specific requirement. This can violate language/locale policy when the skill is used in broader contexts.
These lines describe connecting the skill into a broader 'perception→planning→execution→verification→reflection→memory' super-agent loop and continuous meta-evolution across sessions. That is broader than merely providing adversarial-robustness capability with better verification, and introduces orchestration/platform behavior not evident from the core purpose of the skill.
The document is entirely written in Chinese, including headings and operational descriptions, with no indication that language selection is optional or user-configurable. Under the policy, a skill artifact that enforces a specific language without user opt-in is a natural-language policy violation.
This Python code writes persistent data to learned_patterns.json, which affects local user/system state. While the module docstring describes recording invocation outcomes, there is no confirmation prompt, user-facing log/print before the write, or inline warning near the operation itself.