Back to skill

Security audit

开店选址分析

Security checks for vulnerabilities and agentic risk

Overview

The skill matches its store-location analysis purpose, but the generated HTML report can execute untrusted content and loads an external chart script, so it needs Review before installation.

Install only if you are comfortable sending analyzed addresses and store types to Amap. Treat generated reports as active HTML: do not open reports created from untrusted JSON, untrusted addresses/store types, or untrusted API data in a sensitive browser session, and prefer a fixed version that escapes HTML/JavaScript values and bundles or integrity-pins Chart.js.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_report.py:505
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis
{icon}
{label}
{count} 个 密度 {density}/km²
{items}
""" for c in competitors.get("top_competitors", [])[:8]: comp_list_html += f""" {c['name']} {c['distance']}m {c.get('rating', '-')} {c.get('address', '-')} """ ``` Additional unescaped HTML and JavaScript interpolation occurs in the report template: ```python 开店选址分析报告 - {address}
{address} — {store_type}选址评估
{address}
{store_type}

竞品分析 — {store_type}

``` The JavaScript-context sink is: ```javascript datasets: [{ label: '{store_type}选址评分', data: [ {scores.get('foot_traffic', 0)}, {scores.get('customer_demographics', 0)}, {scores.get('traffic_pattern', 0)}, {scores.get('spending_power', 0)}, {scores.get('competition', 0)}, {scores.get('environment', 0)} ], ``` ### Technical Analysis The report generator constructs an HTML document through Python f-string interpolation without applying output encoding appropriate to the destination context. The affected values include: - The user-supplied store type. - The user-supplied address or its geocoded represent ...[truncated 2483 chars]
Remediation
View remediation
``` 6. Add regression tests containing HTML metacharacters, closing tags, quotes, and JavaScript breakout sequences in every externally derived field. Verify that the resulting report displays them only as text. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/generate_report.py:187
Finding

Externally Hosted JavaScript Is Executed Without Integrity Verification

Content
View full analysis
``` ### Technical Analysis Every generated report loads and executes Chart.js from a third-party CDN when the report is opened. Although the package version is specified, the response is not protected by a Subresource Integrity hash. The browser therefore has no cryptographic mechanism to verify that the downloaded script matches the artifact reviewed by the Skill author. This also means that an otherwise local report unexpectedly requires outbound network access. The externally delivered script executes with the same browser privileges as the report itself. Potential compromise points include the CDN, package publication infrastructure, DNS or network controls, and any component capable of changing the resource returned for the URL. ### Attack Path 1. The Skill generates an HTML report containing the external script reference. 2. A victim opens the report while network access is available. 3. The browser requests the JavaScript resource from `cdn.jsdelivr.net`. 4. If the dependency delivery path returns a malicious or altered script, the browser cannot detect the change because no integrity hash is specified. 5. The altered script executes in the report's page context. ### Impact Assessment A compromised dependency response could: - Read and modify all data displayed by the report. - Falsify scores, recommendations, and competitor information. - Send report contents or browser-accessible information to an external endpoint. - Present phishing content or redirect the user. - Exercise permissions and authenticated access available to the report's web origin if reports are hosted by another application. The issue does not independently provide operating-s ...[truncated 121 chars]
Remediation
View remediation
``` The hash must be calculated or obtained from a trusted source for the exact downloaded artifact. 3. Apply a restrictive Content Security Policy that permits scripts only from explicitly approved sources and prevents arbitrary outbound connections. 4. Document that opening the report performs a third-party network request. If privacy or offline operation is expected, disable all external dependencies. 5. Pin and periodically review the exact dependency artifact rather than relying only on a versioned CDN URL. ]]>
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 (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

核心用途总体相关,都是做基于高德地图数据的开店选址分析,因此不是完全不同的技能。但描述中最突出的能力是“生成交互式HTML可视化选址报告”,包括仪表盘、雷达图、竞品对比表、行动建议;而实际代码仅进行数据抓取、规则评分和JSON输出,没有任何HTML生成、可视化渲染或前端交互逻辑。代码还将所谓‘六大维度’中的第六维实现成‘environment’环境分,而不是描述中的更明确业务维度集合;行动建议也仅在竞品分析中提供简短策略文字,达不到完整报告级别。因此描述对最终产物和表现形式存在实质性夸大,属于描述与行为不一致。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to access environment variables, read/write files, and make network-backed API calls, but it declares no explicit tool scope or permissions. This creates a least-privilege violation: an orchestrator may grant broader capabilities than users expect, increasing the blast radius if the skill is misused or the implementation is later modified.

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 natural-language phrases that could match ordinary conversation and invoke the skill unexpectedly. In a skill that performs network access, reads environment configuration, and writes output files, unintended activation can cause unnecessary external requests, incidental data processing, or user confusion about why actions were taken.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The description and required input format specify Chinese addresses and present the skill entirely in Chinese, but do not state that the locale is optional or limited to a China-specific deployment. This can violate language/locale policy when users are not given a choice or clear opt-in.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

文件级文档明确说明该脚本“输出结构化JSON分析数据”,CLI 逻辑也只生成 JSON 并打印到 stdout 或写入文件,没有任何 HTML、仪表盘、雷达图、竞品对比表可视化生成逻辑。技能清单将该技能描述为会生成交互式 HTML 可视化选址报告,因此该实现只覆盖了数据分析子步骤,未实现所宣称的核心输出形式。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language strings throughout the module, including the top-level description and CLI help, are presented only in Chinese, which imposes a specific language/locale on users. The file does not offer an opt-in language selection or document that the skill is intentionally limited to a China-specific audience or workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill sends user-supplied addresses and derived geolocation queries to the external Amap API without any explicit user-facing disclosure or consent step. Location data can be sensitive, and in this skill context the entire purpose is analyzing a specific target site, so users may unknowingly disclose precise commercial plans or personal addresses to a third party.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file-level docstring and CLI description are written entirely in Chinese, and the generated HTML is explicitly marked as zh-CN. This indicates the skill is designed to operate in a fixed language/locale without offering the user any language choice or documenting why the locale restriction is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTML output sets lang="zh-CN" and presents the report title and interface content in Chinese only. Under the policy rule, forcing a specific language/locale without user choice or clear documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.