Back to skill

Security audit

外卖推荐

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a real food-delivery recommendation helper, but it automatically saves precise location, food preferences, and order history in persistent local memory without clear user consent.

Review before installing if you do not want a skill to remember your address, dietary preferences, budget, or order history. Prefer using it only if you are comfortable with persistent local memory, or edit the skill to ask before saving and to store coarse location aliases instead of exact addresses.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:121
Finding

Automatic Plaintext Persistence of Sensitive User Location and Preference Data

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 121–149 and 309–312
Vulnerability Type: Plaintext storage and reuse of privacy-sensitive user data
Risk Level: Medium

Vulnerable Code Snippet

markdown
激活技能后,**第一件事**是检查记忆然后询问:

**首次使用(无记忆):**
> "帮您找附近好外卖 🍜 请问您现在在哪?(街道/小区/地标都可以)另外有没有菜系或预算偏好?没有的话我直接推荐综合好评 Top 5~"

**有历史记忆:**
> "帮您找附近好外卖 🍜 还是上次的 {地址} 吗?上次您偏好 {菜系},这次还来这类,还是换换口味?"

- 如果用户只给地址、没提偏好 → 直接搜索推荐,省一轮对话
- 地址模糊时追问具体地标
- 接受格式:街道地址、小区名、商圈名、地标建筑名

**地址与口味偏好记忆机制:**

搜索完成后,向 `~/.workbuddy/MEMORY.md` 写入/更新以下两项持久记忆:

外卖偏好

  • 常用地址:{地址}
  • 口味偏好:{菜系偏好 / 忌口 / 预算范围 / 其他偏好}
text

- **地址记忆**:下次激活时,若存在常用地址,优先询问:"还是上次的 {地址} 吗?"
- **口味偏好记忆**:下次激活时,若存在口味偏好,在询问中自动带上:"上次您偏好 {菜系},这次还来这类吗?"
- **偏好更新时机**:每次点餐结束后,若用户表达了新的菜系偏好、忌口、预算习惯,更新口味偏好条目

The Skill also stores ordering history:

markdown
如果用户回复了选了哪家,写入记忆:
text
## 外卖偏好
- 最近一次点单:{商家名}({日期})

Technical Analysis

The Skill instructs the agent to read persistent memory as its first action and automatically write the user's address, dietary restrictions, budget, preferences, and ordering history to ~/.workbuddy/MEMORY.md. These fields can reveal a likely home or workplace location, health- or religion-related dietary information, spending patterns, and behavioral history.

The design provides no explicit opt-in requirement, data minimization rule, expiration period, deletion mechanism, encryption requirement, or restrictive file-permission requirement. It also directs the agent to repeat saved address and preference information in later sessions. Because the memory file is shared persistent state rather than session-local storage, other Skills, local processes, or unintended participants in a later conversation may be able to retrieve or expose this information.

This is not classified as agent memory poisoning because the stored content is user profile data rather than attacker-controlled instructions intended to alter future agent behavior. The best matching classification ...[truncated 1695 chars]

Remediation
View remediation

Remediation Suggestions

  1. Require explicit opt-in

    • Ask whether the user wants the address or preferences saved before writing persistent memory.
    • Keep storage session-only by default.
    • Treat consent for location, preferences, and ordering history as separate choices.
  2. Minimize retained information

    • Store a user-selected alias such as “office area” instead of a full address.
    • Prefer a coarse district or business area where precise location is unnecessary.
    • Do not retain ordering history unless it is required and separately authorized.
  3. Protect stored data

    • Use a dedicated structured store rather than a shared general-purpose Markdown file.
    • Apply restrictive owner-only file permissions.
    • Use platform-provided encrypted storage where available.
    • Ensure unrelated Skills cannot read this Skill's private state.
  4. Add lifecycle controls

    • Define a short expiration period.
    • Allow users to inspect, update, and delete saved data.
    • Automatically remove obsolete locations and ordering records.
  5. Prevent conversational disclosure

    • Do not repeat a complete saved address automatically.
    • Use a masked or aliased location and require confirmation before revealing details.
    • Reconfirm the user's identity or session context before using persistent location data.
  6. Constrain memory access

    • Read only the Skill-specific memory namespace.
    • Never interpret stored preference fields as executable instructions.
    • Validate and length-limit all values before persistence.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill stores exact address and food preference data in persistent local memory without an explicit privacy warning. Because addresses can identify a user's home, workplace, or routine, storing them silently creates a meaningful privacy and surveillance risk if the file is later read, reused, or leaked.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill explicitly directs the agent to persist user-provided location and preference data for future reuse. Persistent storage of exact location and preference history increases the blast radius of any memory-file exposure and creates cross-session profiling risk that is not necessary for core recommendation functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs persistent storage of sensitive user data, including address and dining preferences, in a local memory file, but this is not disclosed in the manifest description. Undisclosed retention of location and preference data creates a privacy risk and weakens informed consent, especially because addresses are highly sensitive personal information.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Persistently storing historical address and preference data is broader than what is strictly necessary to provide one-off food recommendations. This creates avoidable privacy exposure, because retained location history can reveal home/work patterns and personal habits over time if accessed by other skills, processes, or users of the same environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest promises recommendations within 3km, but the documented fallback expands searches to 5km. This is a scope-expansion issue that can surprise users and violate least-surprise expectations, especially when location-derived behavior is involved. While not directly enabling code execution, it broadens data use beyond the declared behavior.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The optional browser automation goes beyond simple search-and-ranking by opening third-party platforms and extracting real-time data. That broader capability increases exposure to over-collection, unintended interactions with authenticated sessions, and scraping of more user-visible data than the manifest suggests.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file contains natural-language instructions that force a specific language/locale experience for users. Under the policy, a skill should not impose a language without user opt-in unless the restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description is entirely in Chinese and defines activation solely through Chinese phrases such as "点外卖" and "订餐". This indicates a language-specific constraint, but the file does not offer user opt-in, multilingual alternatives, or a documented justification that the skill is intended only for a Chinese-language context.

Content

No source excerpt is available for this finding.

Ssd 3

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

Recording the user's last order in persistent memory enables cross-session behavior shaping and adds another layer of personal habit tracking. Although less sensitive than exact addresses, order history can still reveal dietary habits, religion, health-related preferences, or routines when combined with other stored data.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.