T02 · Agent Memory Poisoning
- Location
scripts/learner.py:47- Finding
Unrestricted persistent preferences can poison future agent behavior
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is not malicious, but it combines a reasoning demo with persistent cross-session learning and self-editing guidance that users should review carefully before installing.
Install only if you are comfortable with this skill keeping a persistent local memory of usage, errors, and preferences. Treat learned_patterns.json as untrusted state, avoid storing secrets or sensitive notes in it, and do not allow automatic SKILL.md rewrites without explicit review.
scripts/learner.py:47Unrestricted persistent preferences can poison future agent behavior
The declaration says the unified layer explicitly marks conflicts between symbolic and neural conclusions, but the implementation description indicates no actual conflict comparison or arbitration is present. In a trust-oriented reasoning skill, falsely claiming conflict detection is dangerous because users may rely on nonexistent safeguards against hallucinated or contradictory conclusions.
The declaration says the unified layer explicitly marks conflicts between symbolic and neural conclusions, but the implementation description indicates no actual conflict comparison or arbitration is present. In a trust-oriented reasoning skill, falsely claiming conflict detection is dangerous because users may rely on nonexistent safeguards against hallucinated or contradictory conclusions.
The file’s behavior materially diverges from the declared neuro-symbolic reasoning purpose and instead implements a generic cross-skill learning/telemetry component. In a skill ecosystem, this kind of hidden or unjustified capability expansion is dangerous because it creates undisclosed data collection and persistence surfaces that operators may not expect or authorize.
The skill instructs use of local scripts that persist data and may modify files, but it declares no tool scope or permissions boundary. That creates an authorization gap where an agent could perform file writes not transparently disclosed to the user or orchestrator, increasing the chance of unintended persistence or self-modification.
The natural-language instructions and examples are presented entirely in Chinese, including user-facing preference examples such as 输出语言 --val 中文, with no indication that other languages are supported. This can amount to a language/locale policy issue when a skill effectively forces a specific language without user opt-in or justification.
The latter half of the skill introduces a general self-evolving learning system unrelated to the declared neuro-symbolic reasoning scope. Scope expansion inside a skill is risky because it hides additional behaviors like persistence, profiling, and file modification under the cover of an ostensibly reasoning-only capability.
L55 声称“每次使用后自动复盘、积累经验”,给人的语义是技能会在使用后自动执行学习流程;但 L60-L72 又明确要求用户通过 Bash 手动调用 record/prefer/insight/reflect 子命令。这不是单纯信息遗漏,而是自动与手动触发方式的直接冲突。
The skill describes storing usage history and user preferences across sessions without a clear privacy warning or retention notice. Hidden persistence of behavioral data can expose sensitive preferences, workflows, and failure context, especially in multi-user or shared environments.
The skill gives natural-language instructions to retain user preferences and usage history in a persistent memory file across sessions. Cross-session memory without strict minimization or consent increases privacy risk and can accumulate sensitive operational context beyond what is needed for the claimed task.
Persisting user preferences and error patterns is outside the direct reasoning purpose and introduces unnecessary collection and retention of user-derived data. The extra context makes this more dangerous because the skill presents itself as a reasoning engine, so operators may not expect telemetry-like memory behavior.
The instructions encourage logging detailed failure notes and user preferences for future reuse, which can capture sensitive content, internal errors, or personal data. Because the skill is framed as a reasoning module rather than a telemetry collector, this data capture is more likely to be unexpected and less scrutinized.
The narrative instruction to remember important user preferences and automatically apply them later establishes behavioral profiling across sessions. Automatic reuse of stored preferences can leak prior-user context, surprise users, and create privacy and policy issues if the environment is shared or the stored preferences are sensitive.
The instruction to write learned behavior back into SKILL.md implies self-modifying documentation, but this side effect is not clearly warned about as a file modification risk. Self-editing skill docs can tamper with future behavior, auditability, and trust boundaries, especially if later agents treat the modified file as authoritative.
This is a natural-language policy issue because the file presents its description, usage instructions, and operational guidance only in Chinese. The skill does not offer an opt-in language choice or explain that it is intentionally limited to a Chinese-speaking context.
The code can read/write under arbitrary skill directories and persist preferences, notes, and operational history unrelated to the stated reasoning task. This creates a privacy and integrity risk: other skills’ state can be modified or accumulated without clear authorization boundaries, and free-form notes may capture sensitive user or workflow data.
The documentation and API contract say symbolic and neural conflicts are explicitly surfaced, but the implementation always returns conflict=False and never compares symbolic and neural conclusions. In a reasoning engine intended for trusted or auditable decision support, this can mislead downstream callers into treating contradictory evidence as non-conflicting, causing unsafe automation or over-trust in outputs.
This is effectively a security-relevant integrity flaw: the module claims dual-path analysis with explicit conflict marking, but no conflict analysis exists anywhere in the code path. In contexts like trusted QA, anti-hallucination, or policy-gated reasoning, the false claim of conflict handling can suppress operator skepticism and permit contradictory neural inferences to pass without warning.