T02 · Agent Memory Poisoning
- Location
scripts/learner.py:36- Finding
Unvalidated Persistent Preferences and Notes Can Poison Future Agent State
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The counterfactual calculator is local and simple, but the skill also includes automatic local learning memory that stores usage, errors, notes, and preferences without clear consent or limits.
Install only if you are comfortable with this skill keeping a local memory file about usage, errors, notes, and preferences. Avoid using it with confidential decisions unless persistence is removed or made opt-in, and treat anything stored in learned_patterns.json as untrusted data rather than instructions.
scripts/learner.py:36Unvalidated Persistent Preferences and Notes Can Poison Future Agent State
The declared purpose is a local counterfactual calculator, but the skill also advertises persistent self-learning, usage logging, error tracking, and user-preference storage. This mismatch is dangerous because it hides materially different behavior from reviewers and users, increasing the chance of undisclosed data collection and unauthorized persistence under the guise of a simple analysis tool.
The file implements a generic cross-skill telemetry and self-learning subsystem that is unrelated to the declared counterfactual-decision purpose. This expands the skill’s capability boundary to collect and persist usage data for arbitrary skills, increasing privacy and supply-chain risk because a seemingly narrow analytical skill now includes reusable tracking functionality.
Suspicious Unicode normalization or mixed-script content
The skill declares no explicit tool scope or permissions, yet the documentation instructs use of a learning module that writes to a local file (learned_patterns.json). Missing permission disclosure weakens reviewability and consent boundaries: an agent or user may invoke the skill expecting pure local computation, while it also performs stateful writes and retention.
The documentation expands the skill from deterministic local computation into persistent self-learning and preference memory, creating a broader trust and data-handling surface than the core function requires. In this context, the extra persistence is not necessary to compute counterfactuals and therefore increases risk without clear justification.
Persistent collection of user preferences and usage history is not justified by a counterfactual decision calculator's stated purpose. This creates unnecessary privacy exposure and can accumulate sensitive behavioral data over time, especially if the skill is used on confidential business or personal decision scenarios.
The skill states that usage automatically records learning data and user preferences but does not present a clear privacy warning, consent flow, or confirmation step. Silent persistence is risky because users may provide sensitive inputs assuming ephemeral processing, while the skill retains them or derivative preference data locally.
The skill explicitly directs persistent storage of user preferences and usage history in a local memory file. Even if stored locally, this can expose sensitive operational patterns, personal preferences, or confidential decision context to other local users, backups, logs, or later workflows, especially because the storage is framed as routine rather than exceptional.
Suspicious Unicode normalization or mixed-script content
This Python file includes its primary module docstring, CLI description, and user-facing status messages entirely in Chinese, which imposes a specific language/locale on users. The policy allows locale constraints only when they are clearly justified or when the user is offered a choice, neither of which is present here.
The script writes persistent operation history and preferences to a JSON file without any explicit privacy notice, consent flow, or retention policy. Even if stored locally, these records can expose behavioral data, error context, or notes to other local users, backup systems, or downstream tooling, especially because the persistence is silent.
The code records arbitrary capabilities, error notes, recent operations, and user preferences to disk for any referenced skill directory. In the context of a decision-analysis skill, this is unnecessary data collection that can capture sensitive workflow metadata or free-form notes without a clear need, creating privacy and unintended profiling risk.
The manifest description and the rest of the skill instructions are presented entirely in Chinese, and the usage examples and capability labels assume Chinese-language interaction. Under the policy, forcing a specific language without user opt-in can be a natural-language policy issue unless the locale constraint is explicitly justified.