T02 · Agent Memory Poisoning
- Location
scripts/learner.py:82- Finding
Persistent Agent-Memory Poisoning Through Unvalidated Learning Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This finance skill is mostly local, but it adds automatic long-term memory that can store sensitive finance-adjacent notes and influence future skill behavior.
Review this skill before installing if you plan to share transaction histories, budgets, debt details, or investment preferences. Its finance features are not inherently malicious, but its automatic learning file can retain notes and preferences locally and may influence later runs; use only redacted or aggregated data unless the persistence behavior is removed or tightly controlled.
scripts/learner.py:82Persistent Agent-Memory Poisoning Through Unvalidated Learning Data
scripts/learner.py:61Plaintext Persistence of Potentially Sensitive Financial and Personal Data
The skill is presented as a personal finance assistant, but it also includes a generic cross-session learning and persistence mechanism that records usage, errors, and preferences to disk. That is dangerous because users may disclose highly sensitive financial information under a no-storage expectation, while the embedded learner expands the skill’s behavior into persistent data collection beyond its stated purpose.
The document states that financial data is only analyzed and not stored, but later instructs persistent storage of usage history and user preferences in learned_patterns.json. In a finance context, this inconsistency is dangerous because it can mislead users into sharing bank, budget, debt, or spending information under false privacy assumptions, increasing retention and leakage risk.
L007 lists generic trigger terms such as “记账”, “理财”, “省钱”, and “财务规划”, which are broad phrases that could match many ordinary conversations rather than a narrowly defined invocation. The file does not provide negative examples, activation boundaries, or contextual constraints to distinguish when the skill should or should not activate.
The skill invites users to upload or share financial data but does not prominently warn about privacy risks or define safe input boundaries. In a personal finance context, that omission is dangerous because users may provide transaction histories, account details, debts, or other highly sensitive records that could then be exposed, retained, or mishandled.
L094 states that all advice follows Chinese financial regulatory requirements, which is a locale-specific policy constraint. The document does not indicate that this applies only to users in China or offer any language/locale choice, so it may improperly force one jurisdiction's rules on all users.
A generic self-learning and memory system is embedded in a skill whose declared purpose is finance assistance, without a clear functional need tied to the finance workflow. This broadens the skill’s effective scope into profile building and long-term tracking, which is especially sensitive when the surrounding context involves personal financial habits and potential risk tolerance data.
The learning module instructs persistent storage of user preferences and usage history across sessions, creating a durable memory layer in a skill that handles sensitive finance interactions. Even if it claims not to store explicit financial fields, natural-language notes, error records, preferences, and reflections can still capture spending habits, debt concerns, investment preferences, or other sensitive personal-finance signals that may later leak or be misused.
The learner examples reference unrelated capabilities such as resume optimization, indicating the skill contains copy-pasted or multi-purpose behavior not aligned with a finance-only assistant. This is dangerous because it suggests the skill may invoke or retain data under a broader hidden framework, weakening trust boundaries and increasing the chance of unintended processing of sensitive user information.
The module is explicitly designed as a generic cross-skill learner for any WorkBuddy skill, not as a finance-specific helper. That broad scope enables collection of arbitrary capability usage, errors, notes, and preferences across unrelated skills, expanding data collection beyond the declared purpose and increasing privacy and misuse risk.
The natural-language documentation and all CLI/user-facing messages are written only in Chinese, which imposes a language choice without offering the user any locale selection or opt-in. The policy specifically flags language or locale constraints when they are forced rather than optional or justified.
The data model persists preferences, error patterns, recent operations, and optimizations in a generic structure that is unrelated to personal-finance functionality. In this skill context, that makes the component context-inappropriate telemetry collection and creates unnecessary accumulation of behavioral data that could reveal sensitive user habits.
The code writes learned_patterns.json to disk and stores user preferences, notes, operational history, and error metadata without any user-facing disclosure or consent mechanism. Because this is a personal finance skill, persisted notes and preferences may contain sensitive financial or behavioral information, raising privacy risk if accessed locally or reused unexpectedly.