Back to skill

Security audit

Model Advisor

Security checks for vulnerabilities and agentic risk

Overview

This skill is a model recommendation helper, but it broadly inserts itself into ordinary tasks and can persist model preferences in a shared hard-coded memory file.

Install only if you want a proactive model-selection advisor. Review whether you are comfortable with it appearing on ordinary tasks and storing model preferences in a shared local memory file; prefer requiring explicit confirmation before any persistent write.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:203
Finding

Persistent Model Preferences Can Influence Future Agent Sessions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:203, SKILL.md:250-259, and references/model_rules.md:66-69
Vulnerability Type: T02: Agent Memory Poisoning
Risk Level: Medium

Relevant instruction excerpt translated into English:

markdown
### Step 4: Record user feedback (optional)

Record user model preferences in
`C:\Users\huang\.workbuddy\memory\MEMORY.md`:

## Model Preferences
- Quantitative trading analysis: Prefer Deepseek-V4-Pro
- Code development: Prefer DeepSeek-V3.2
- Simple tasks: Prefer Deepseek-V4-Flash

Override rule in references/model_rules.md:66-69, translated into English:

markdown
## User Preference Overrides

Model preferences recorded by the user in MEMORY.md override the default
recommendations. For example, if the user prefers Deepseek-V4-Pro for code
development, it becomes the first choice for that task type.

Technical Analysis

The Skill instructs the Agent to write model preferences into the general-purpose, persistent MEMORY.md file. A separate rule explicitly states that values from this file override the Skill's default recommendations. This creates a cross-session state modification channel through which content collected while the Skill is active can continue changing Agent behavior after the current invocation ends.

The demonstrated content is limited to benign model preferences, and the write is described as optional. Nevertheless, the architecture does not specify explicit user consent, an allowlist of permitted model identifiers, separation between data and instructions, or a Skill-scoped storage boundary. If untrusted or manipulated preference text is written without validation, the persistent file may contain attacker-controlled content that later Agent sessions interpret as authoritative memory.

The hard-coded, user-specific Windows path also weakens isolation. In a different deployment, it may target the wrong user profile, ...[truncated 1749 chars]

Remediation
View remediation

Remediation Suggestions

  1. Keep model preferences session-local by default and do not write them into general Agent memory.
  2. Require explicit, informed user confirmation immediately before every persistent write. Display the exact destination and value that will be stored.
  3. Store persistent preferences in a Skill-scoped configuration file rather than a shared MEMORY.md file.
  4. Use a structured schema containing only fixed fields such as task category and model ID.
  5. Validate model IDs against a strict allowlist and reject free-form text, Markdown, commands, role instructions, URLs, and additional directives.
  6. Treat persisted values strictly as data. Never insert them into an instruction or system-prompt context without safe parsing.
  7. Replace the hard-coded user path with a platform-approved, per-user configuration directory resolved by the host application.
  8. Apply least-privilege file permissions so the Skill can access only its own configuration data.
  9. Provide controls for users to inspect, modify, expire, and delete stored preferences.
  10. If shared memory must be used, namespace entries to this Skill and ensure they cannot override unrelated Agent policies or safety instructions.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README states the skill should trigger automatically for every new task and also on broad model-related phrases, which can cause the agent to intervene on ordinary requests without clear user intent. In a model-switching skill, over-broad invocation can redirect workflow, produce unsolicited recommendations, and potentially alter execution context or command suggestions when the user did not ask for them.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The description says the skill should proactively trigger at the start of every new task, causing it to insert itself into broadly unrelated interactions. Overly broad auto-invocation increases the chance of unnecessary processing, prompt interference, and unintended handling of user content that was not meant for this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire README presents the skill name, usage, examples, and outputs only in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-only region or audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs recording user feedback/preferences to local memory but provides no notice that data will persist or how it will be used. Silent persistence undermines user expectations and can store behavioral data without informed consent or retention boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger list includes generic phrases such as '帮我', '怎么', and '为什么', which appear in ordinary conversation and would cause frequent accidental activation. This can hijack normal workflows, produce irrelevant model-switch prompts, and route more user content through the skill than necessary.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The plain-language memory section operationalizes persistent storage of user preferences in a specific local file path, making retention concrete and likely to be implemented. Even if the data seems low sensitivity, accumulated preference history can reveal project types, privacy needs, or work habits, and the fixed path increases discoverability on a shared system.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill directs the agent to persist user model preferences into a local memory file, expanding scope from transient recommendation to long-term data retention. Persistent storage of user behavior/preferences without explicit consent, minimization, or retention controls can create privacy and compliance risk, especially if preferences indirectly reveal sensitive work patterns.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The reference file is entirely written in Chinese and defines user-facing behavior without any indication that the skill should detect or respect the user's preferred language. This can cause the agent to respond in an unintended language, degrading usability and potentially causing misunderstandings when model recommendations, privacy guidance, or cost tradeoffs are communicated incorrectly.

Content

No source excerpt is available for this finding.