Back to skill

Security audit

饮食记录

Security checks for vulnerabilities and agentic risk

Overview

This diet-log skill is purpose-aligned and uses local files for nutrition lookup and meal logs, with the main caution that meal history is saved persistently in plaintext.

Before installing, understand that meal entries can reveal health, lifestyle, and religious information and will be stored locally in references/meal_log.json until you delete that file. Verify the manually downloaded food_data.json source, and do not treat the nutrition output as medical advice.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

声明描述的是一个较完整的饮食记录与营养分析系统,但当前代码片段的实际功能范围明显更窄,只是一个食物营养查询工具。它确实支持读取 food_data.json 并返回热量、宏量营养素、脂肪酸、矿物质和维生素等字段,这与声明的一部分相符;但声明中的核心能力——饮食记录持久化、统计分析、解析用户饮食记录、以及更完整的匹配流程——在这段代码中都不存在。尤其是 meal_log.json 写入和阶段性统计完全缺失,属于实质性能力不符,因此应判定为描述与代码行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

代码的核心行为与声明部分重合在于:能够记录一餐的营养汇总、保存日志,并对一段时间内的记录做营养统计。但声明强调的关键前置能力——从用户饮食描述中解析食物、查找营养数据库、进行食物匹配与必要确认——在该代码中完全不存在。脚本假设输入已经是包含营养字段的 JSON 列表,因此其实际职责更接近“接收已结构化营养数据并做存储/统计”,而不是完整的“饮食记录与营养分析助手”。此外,输出日志路径也比声明更具体且不完全一致。综合来看,描述高估了代码能力,属于实质性描述与行为不符。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README states that meal records are automatically saved locally, but it does not prominently warn users before use that persistent personal dietary data will be retained. Because diet logs can reveal sensitive health, lifestyle, and religious information, silent or poorly disclosed retention creates a real privacy risk even if the data never leaves the device.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill instructs reading and writing local files (references/food_data.json and references/meal_log.json) but does not declare tool scope or permissions. That creates an authorization ambiguity where a runtime may grant broader file access than users expect, increasing the risk of unintended file reads/writes or privacy-impacting data persistence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description is entirely written as Chinese-only interaction guidance and does not indicate that users may choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is explicitly justified, which is not provided here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The confirmation prompt is hardcoded in Chinese and gives no indication that the assistant should adapt to the user's preferred language. This creates a language-policy issue because the skill behavior appears to mandate a specific language without offering choice or documenting a justified locale restriction.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script persistently stores meal records, including dates, detailed food intake, and free-form notes, in a local JSON file without any privacy notice, consent flow, retention policy, access control, or minimization. Dietary logs can reveal sensitive health and lifestyle information, so silent long-term storage increases privacy risk if the host system, workspace, or shared skill directory is accessed by other users or tools.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The language switch presents 'English | 简体中文', with this README entirely in Simplified Chinese and no indication in-file that language is user-selectable within the skill itself. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code file contains natural-language strings that force a specific language for usage instructions and outputs. Under the language/locale policy, a skill should not impose a language without user opt-in unless the locale 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 docstring, CLI usage messages, and user-facing output strings are all in Chinese, which effectively forces a specific language for interaction. There is no indication that this is a region-specific skill or that users can opt into another language.

Content

No source excerpt is available for this finding.