T02 · Agent Memory Poisoning
- Location
scripts/learner.py:65- Finding
Untrusted Preferences and Notes Persist Across Agent Sessions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does local analogical reasoning, but it also persists user preferences/history and tells agents to reuse that state and potentially rewrite the skill instructions.
Review this before installing. The analogy engine itself is local and simple, but the skill asks agents to keep persistent memory about usage, errors, and user preferences, then reuse that memory later. Only install it if you are comfortable with local cross-session state, and avoid storing secrets or sensitive personal details in learned_patterns.json. Do not allow automatic edits to SKILL.md without explicit human review.
scripts/learner.py:65Untrusted Preferences and Notes Persist Across Agent Sessions
The declared purpose is analogical reasoning, but the skill also includes a persistent cross-run learning subsystem that records usage statistics, user preferences, error patterns, and reflective suggestions. This hidden expansion of behavior undermines informed use and can lead to collection and retention of interaction-derived data unrelated to the core task.
The skill documents executable commands that invoke a learner component which writes persistent state, but the manifest declares no explicit tool scope or permissions. That mismatch can cause agents or users to run a supposedly simple reasoning skill that performs filesystem writes without clear authorization boundaries or informed consent.
The documentation presents the skill as a local, traceable reasoning tool, but it also embeds a persistent self-learning mechanism that evolves behavior across runs. That discrepancy weakens traceability and predictability because outputs may be influenced by prior stored state rather than only current inputs.
The skill does not prominently warn that it stores user preferences and usage history in a local memory file. This lack of disclosure prevents informed consent and increases the risk that sensitive or identifying interaction data will be retained unexpectedly.
Persisting user preferences and accumulated experience is not necessary for basic analogical reasoning, so the extra data collection expands the attack and privacy surface without clear justification. If sensitive prompts or preferences are captured, they may be retained and later exposed to other runs or users sharing the environment.
Persistent storage of user preferences and interaction-derived data creates a real confidentiality risk because local memory files can retain sensitive details beyond the original session. In the context of a reasoning skill, such retention is not obviously required, making unintended disclosure or reuse more concerning.
The instruction to write learned experience back into SKILL.md propagates interaction-derived state into the skill’s own definition, increasing persistence, review difficulty, and the chance of leaking prior user information or unsafe behavioral drift. Modifying the instruction file also blurs the boundary between code, documentation, and accumulated data, which can amplify later misuse.
The file implements a generic cross-skill telemetry and preference persistence module rather than functionality specific to analogical reasoning. In a skill ecosystem, this broad reusable learner can collect behavior and notes across arbitrary skills, expanding data collection beyond the stated purpose and increasing privacy and trust-boundary risk.
The module docstring, CLI description, and operational messages are written entirely in Chinese, which imposes a specific language on users. The file does not offer a language selection mechanism or explain that the skill is intentionally region-specific, so this appears to violate the language/locale policy requirement.
The manifest describes an analogical reasoning skill, but this file only records operational logs, errors, notes, and user preferences to disk. That mismatch is dangerous because users and reviewers may grant the skill permissions or trust appropriate for reasoning logic while hidden persistence/profiling behavior runs instead.
Claiming a zero-dependency, local reasoning tool while later describing automatic learning and persistent memory creates a misleading trust signal. Users may treat the skill as self-contained and ephemeral when it actually changes behavior and writes data across sessions.
The manifest description and the main documentation are presented in Chinese, which imposes a specific language on users without indicating an alternative or asking for language preference. Under the language/locale policy, this is a natural-language policy concern unless the skill offers language choice or clearly justifies the locale restriction.