Back to skill

Security audit

摆摊创业全流程助手

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its street-vending planning purpose, but its generated HTML reports can execute injected script if report data is untrusted.

Review this before installing if reports may include data from other people, scraped sources, or untrusted JSON files. The bundled calculators are local and purpose-aligned, but the report generator should HTML-escape user-controlled fields or otherwise sanitize input before generated reports are opened or previewed.

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/report_generator.py:32
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis
= 75 else ("#f59e0b" if p.get("overall_score", 0) >= 60 else "#ef4444") product_cards += f"""
#{i+1}
{p.get('category_icon', '📦')} {p.get('name', '未知品类')}
{p.get('category', '')} {p.get('difficulty_label', '')} 竞争: {p.get('competition', '未知')}
¥{p.get('min_budget', 0)}+启动金
{p.get('profit_rate', 0)*100:.0f}%毛利率
¥{p.get('daily_range', '')}日流水
{p.get('overall_score', 0)}分
""" ``` The same insecure interpolation pattern also appears in profit advice, location details, weather tips, competitor information, checklist entries, user-profile fields, and final recommendations throughout lines 71-320. ### Technical Analysis The report generator accepts externally supplied JSON through the `--data` or `--data-file` arguments. String values from this JSON are inserted directly into an HTML document using ...[truncated 2211 chars]
Remediation
View remediation
str: return escape(str(value), quote=True) ``` Use the helper consistently: ```python product_name = html_text(p.get("name", "Unknown product")) category = html_text(p.get("category", "")) ``` 2. Do not assume values produced by an Agent or loaded from a local JSON file are trusted. Treat every report field as untrusted input, including list entries and nested dictionaries. 3. Validate the complete input structure before rendering: - Require expected object and array types. - Enforce numeric types and reasonable ranges for scores, percentages, and monetary values. - Limit string lengths to prevent oversized reports and rendering abuse. - Reject unexpected fields where practical. 4. If selected fields intentionally support formatted content, sanitize them with a maintained HTML allowlist sanitizer. Permit only necessary tags and attributes, and reject scripts, event-handler attributes, unsafe URLs, embedded objects, and active SVG content. 5. Add a restrictive Content Security Policy, preferably through an HTTP response header when reports are served. For standalone files, include an appropriate policy in a `` element. Move the legitimate inline script to a separate trusted file or protect it with a nonce or hash. A baseline policy should deny plugins, frames, and uncontrolled network access. 6. Add regression tests using payloads in every string-bearing field, including: ```html "> ``` Tests should verify that these payloads appear as escaped text and never create executable DOM nodes. ]]>
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (18)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description promises a broad end-to-end assistant with 7 major modules and multiple engines, including利润精算、选址评估、竞品分析、天气应对、合规检查、综合决策报告 and interactive HTML reports. The actual code chunk is narrowly scoped: it contains a hardcoded product database and a matcher that scores candidate stall products based on budget, city fit, season, difficulty, and competition, then prints ranked results or JSON. While this does align with the '品类智能匹配' portion of the description, it does not implement most of the prominently claimed functionality. Therefore the description materially overstates the code’s actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a broad end-to-end assistant with seven modules and several specialized engines, including category selection, site evaluation, competitor analysis, weather handling, compliance checking, and interactive HTML reports. The actual code chunk implements only one subset of that scope: a profit calculator. It does not access market research datasets, perform recommendation or location scoring, analyze competitors, evaluate compliance, react to weather, or generate HTML visualizations. While profit calculation is consistent with one part of the declared purpose, the supplied code materially under-implements the overall described functionality, so the description does not accurately represent this code chunk.

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 broad, everyday commerce terms such as “出摊”, “摊位”, and related generic phrases that could cause the skill to activate outside the author’s intended context. In an agent environment, over-broad invocation can route unrelated user conversations into this skill, creating policy, UX, and possible data-handling risks if the skill starts collecting business details unnecessarily.

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.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description advertises '竞品分析' and '合规检查' as covered modules, suggesting implemented operational support. In the file body, however, there are explicit execution steps only for product recommendation, profit calculation, location assessment, weather advice, checklist generation, and report output; competitor analysis appears only as a JSON placeholder and compliance is reduced to generic reminders/checklist items rather than a real analyzer.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

L007-L008 的触发词中包含“摆摊”“出摊”“摊位”等高度通用或语义范围很宽的词,且未说明具体触发边界或排除场景。这类词在普通对话中也可能自然出现,容易与非技能调用语境重叠,造成误触发。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file presents all instructions and guidance exclusively in Chinese, and there is no indication that users can select another language or that the skill is intended only for a Chinese-speaking or region-specific audience. That creates a natural-language locale policy concern under the rule requiring opt-in or justified language constraints.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The document title and all instructional/business content are presented only in Chinese, with no indication that language selection is optional or that the skill is intended exclusively for a Chinese-speaking or region-specific context. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This is a code file, so natural-language strings in docstrings and CLI help text are in scope for policy review. The tool forces a specific language/locale for usage instructions and output, and there is no indication that users can select another language or that the locale restriction is justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Argument descriptions, help text, and runtime output are all presented only in Chinese. Under the stated policy, forcing a specific language without offering user choice is a natural-language policy violation unless the locale constraint is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This code file’s natural-language strings and usage documentation are entirely in Chinese, and the CLI output/help text also assumes Chinese-language interaction. Under the policy, forcing a specific language without user opt-in or a documented justification is a locale-policy violation.

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 sets the HTML document language to zh-CN and renders all visible labels, headings, and notices in Chinese. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

文件标题、功能说明、触发词和安装说明均仅以中文呈现,没有说明该技能仅面向中文用户,也没有提供语言选择或用户 opt-in。这可能构成默认强制特定语言的自然语言策略问题。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description presents a strong implementation claim built on embedded research data and multiple solution modules. In the actual file, those capabilities are primarily fulfilled by consulting markdown reference files and static checklists, which is less than the manifest's implication of operational modules across all seven areas.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

文档仅给出一串触发词,但没有说明何时应激活完整技能流程、何时只做普通问答,也没有列出负例或上下文限制。对于 manifest/markdown 描述,这会使调用边界模糊,增加误调用风险。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

L198 使用“Windows环境必须设置 PYTHONIOENCODING=utf-8”的强制性表述,且上下文强调中文/Emoji 输出,但未说明是否仅为技术兼容性要求,或是否支持其他语言/locale 方案。按照语言/locale 政策,强制性的区域/语言约束若无选择或充分说明,可能构成自然语言层面的政策问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill content is presented only in Chinese, with no indication that the user can choose another language or that the locale restriction is optional. Under the policy rules, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language content that forces a specific language for usage instructions and interactions. Under the policy, locale or language constraints should either be optional for the user or clearly justified as region-specific.

Content

No source excerpt is available for this finding.