Back to skill

Security audit

AI 智能家庭厨助

Security checks for vulnerabilities and agentic risk

Overview

This cooking skill is mostly aligned with its stated purpose, but it needs review because it can automatically search online, generate persistent HTML reports, and those reports do not safely escape dynamic content.

Review this before installing if you do not want cooking questions to trigger online lookups or create HTML files automatically. Treat generated reports as untrusted if any recipe, query, or plan JSON came from another person, and be cautious with raw seafood or home-fermentation recipes because safety warnings are inconsistent.

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
scripts/html_report.py:368
Finding

HTML and JavaScript Injection in Generated Reports

Content
View full analysis
str: """Generate cooking-tips HTML.""" cards = "" for t in tips_data.get("results", []): sev = t.get("severity", "") sev_html = "" if sev: sev_class = { "danger": "danger", "warning": "warning", "info": "info" }.get(sev, "") sev_labels = { "danger": "🔴 Dangerous", "warning": "🟡 Warning", "info": "🔵 Information" } sev_html = ( f'' f'{sev_labels.get(sev, "")}' ) cat = t.get("category", "") cat_html = ( f'{cat}' if cat else "" ) cards += f"""
{sev_html}{cat_html}
❓ {t['q']}
{t['a']}
""" title = f"Cooking Tips · {query}" if query else "Cooking Tips Knowledge Base" return f""" {title} {CSS_STYLE}

💡 {title}

Found {tips_data.g ...[truncated 3489 chars]
Remediation
View remediation
``` 6. Avoid allowing arbitrary executable markup even if rich formatting is later required. If limited HTML must be accepted, sanitize it using a maintained allowlist-based HTML sanitizer. 7. Add regression tests using payloads in every rendered field, including: ```html ``` The tests should verify that the generated source contains encoded text such as `<script>` and no executable attacker-controlled elements. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (32)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents a full-featured intelligent cooking assistant with recommendation, planning, substitution, Q&A, HTML reporting, and online search. The supplied code only implements one narrow subset: detailed cooking-step guidance for a specified recipe name using a local database, with optional fuzzy name suggestions and JSON/text output. This is materially narrower than the declared primary purpose. There is no evidence of ingredient-driven recommendations, dietary preference handling, menu planning, substitution logic, HTML generation, or network access. The code is related to cooking, so it is not unrelated, but the description significantly overstates the implemented capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code is clearly related to cooking, but it does not implement the broad assistant described. Its sole substantive function is searching a hardcoded cooking-tips database organized by categories such as knife skills, heat control, seasoning, ingredient handling, tools, common mistakes, advanced techniques, and kitchen efficiency. It accepts --query and --category arguments and prints matching Q&A in text or JSON. There is no logic for recommending dishes from user ingredients, generating recipes, planning menus, suggesting substitutions, rendering HTML cards, or performing network access. So the description materially overstates and misrepresents the implemented behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a broad AI cooking assistant focused on recipes, meal recommendations, substitutions, planning, and HTML report generation. The supplied code does none of that. It defines a static kitchen safety database and a search interface for safety topics only. While '厨房安全' is mentioned in the description as one possible topic area, the code’s actual primary and exclusive behavior is safety knowledge retrieval, not general cooking assistance. There is no recipe generation, recommendation engine, menu planner, ingredient substitution logic, HTML output, or networking. This is a clear material description-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code matches one subset of the description: multi-day menu planning with preferences, exclusions, seasonal recommendations, and recipe selection from a local database. However, the declared skill is much broader, claiming recipe recommendation from ingredients, cooking instructions, substitution advice, cooking Q&A, kitchen safety guidance, 200+ recipe coverage plus online search, and HTML card report generation. None of those broader assistant features are present in this code chunk. The primary implemented behavior is a command-line menu planner, so the description materially overstates the functionality and includes capabilities not implemented by the supplied code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The code is clearly related to recipes and cooking, so it partially aligns with the general domain of the description. However, the declared description substantially overstates the functionality. The supplied code only performs local recipe database loading, filtering, and formatting via command-line arguments. It can show recipe details and basic search results, but there is no implementation of dietary preference reasoning, substitution logic, menu planning, conversational Q&A, HTML report generation, or联网搜索. Thus the description does not accurately represent the actual behavior of this code chunk.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list contains many generic everyday cooking terms, making accidental invocation likely. Unintended activation can cause the skill to run scripts, read local recipe data, generate files, or initiate side effects like HTML report creation or network search when the user did not explicitly request this skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill says it will automatically perform network searches and generate HTML reports, but does not present these as explicit consent-gated side effects at the point of use. Automatic external requests and file generation can expose user query content, create unexpected artifacts on disk, and violate user expectations around privacy and execution boundaries.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JSON includes recipes involving raw, lightly treated, or fermentation-sensitive ingredients where safety guidance is weak, inconsistent, or easy to miss. In a cooking assistant, omission of prominent warnings can lead users to undercook, improperly ferment, or consume higher-risk foods, increasing the chance of foodborne illness or parasite exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring states the skill is a cooking-step guide in Chinese, and all user-facing strings throughout the file are Chinese-only. For a general-purpose cooking guide, this imposes a specific language without offering opt-in or documenting that the skill is region- or locale-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring presents the skill as Chinese-language only, and the CLI descriptions and content are likewise entirely in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified, which it is not here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code generates HTML documents with lang="zh-CN" and Chinese-only titles/subtitles, and the module/docstrings also present the skill as Chinese-only. The file does not offer any user language selection or document a justified region-specific constraint, which matches the locale-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This is a natural-language policy issue because the skill presents its description and user-facing content in a single forced language. The file does not indicate that the skill is region-specific or provide any user opt-in or alternative locale behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The argparse description and help strings are natural-language interface elements, and they are provided only in Chinese. Because there is no language selection or documented locale constraint, this violates the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code embeds its user-facing description, help text, status messages, and formatted output entirely in Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains its docstring, CLI description, help text, errors, and recommendation output entirely in Chinese, which imposes a specific language on all users. The file does not offer any language selection, opt-in, or documented reason that this must be Chinese-only, so it matches the language/locale policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

Natural-language policy violations apply to all file types, including markdown. The skill content, examples, and usage guidance are all presented only in Chinese, which may effectively force a specific language without user opt-in or an explicit documented locale constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states that the skill uses online search supplementation but does not disclose what user inputs may be transmitted externally, creating a transparency and privacy issue. In a cooking assistant, users may share household inventory, dietary restrictions, health-related preferences, or routine information, so silent network transmission can expose personal data to third parties.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
80% confidence
Finding

The trigger '菜谱' is extremely short and generic, so benign conversation can unintentionally activate the skill. In this skill, accidental invocation matters because the spec also contemplates side effects such as file generation and possible network lookups, increasing the chance of unwanted actions.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
80% confidence
Finding

The trigger '食谱' is broad enough to collide with normal user queries. This can route unrelated cooking discussion into the skill unexpectedly and may produce unintended script execution or output generation.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
79% confidence
Finding

The trigger '烹饪' is a generic topic word rather than a distinct invocation phrase. That increases the risk of surprise activation in ordinary chat, which is undesirable when the skill may create files or perform network fallback behavior.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
79% confidence
Finding

The trigger '做饭' is common conversational language and likely to match many unrelated messages. Even low-risk skills should avoid overly broad activators when they can initiate processing or side effects without deliberate invocation.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
78% confidence
Finding

The trigger '炒菜' is short and generic for everyday cooking discussion. This creates unnecessary risk of accidental activation and resulting unintended outputs or tool use.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
76% confidence
Finding

The trigger '红烧' is a broad cooking-method keyword that can appear in many ordinary contexts. Its ambiguity makes misfires more likely than deliberate invocation.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
76% confidence
Finding

The trigger '清蒸' is a generic preparation term and may match routine conversation. Because the skill advertises automatic behaviors beyond plain text response, accidental invocation is a real operational risk.

Content

No source excerpt is available for this finding.