Back to skill

Security audit

外卖比价

Security checks for vulnerabilities and agentic risk

Overview

The skill has a clear price-comparison purpose, but its generated HTML report can run untrusted browser code, so it needs review before use.

Install only if you are comfortable with web searches and a generated local HTML report. Treat the report as untrusted content, avoid opening reports built from suspicious search results, and prefer a version that escapes all report data and pins or bundles the chart library.

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/waimai_compare.py:242
Finding

Stored HTML and JavaScript Injection in Generated Reports

Content
View full analysis
' + format_price(original_price) + '' ``` Attacker-influenced platform names are also serialized directly into an inline script: ```python radar_js_parts = [ "const platforms = " + json.dumps(radar_platforms, ensure_ascii=False) + ";", "const dimensions = " + json.dumps(radar_dimensions, ensure_ascii=False) + ";", "const scores = " + json.dumps(radar_scores, ensure_ascii=False) + ";", "const platformColors = " + json.dumps(radar_platform_colors, ensure_ascii=False) + ";", ] ``` ```python '', ``` ### Technical Analysis The report generator accepts structured JSON through `--data` or `--data-file`. Some textual fields are escaped with `html.escape`, but price values, coupon amounts, and coupon thresholds are returned without HTML encoding before being concatenated into the report. The inline JavaS ...[truncated 2198 chars]
Remediation
View remediation
`, `&`, U+2028, and U+2029 before insertion into HTML. 4. If inline JSON remains necessary, replace HTML-significant characters after serialization, for example by encoding `<` as `\u003c`, `>` as `\u003e`, and `&` as `\u0026`. 5. Add a restrictive Content Security Policy. Remove inline scripts where possible and disallow script execution from unapproved sources. 6. Add regression tests using payloads containing HTML elements, event handlers, quotes, ``, U+2028, and U+2029. ]]>

T08 · Insecure Dependencies

Warning
Location
scripts/waimai_compare.py:429
Finding

Unpinned Remote JavaScript Dependency Without Integrity Verification

Content
View full analysis
', ``` ### Technical Analysis Every generated report loads and executes Chart.js from jsDelivr when the report is opened. The dependency uses the broad major-version selector `@4` rather than an exact immutable release. It also lacks a Subresource Integrity hash. As a result, the executable content viewed by the user is not fully represented by the audited project. It may change after the report is generated because of a package update, CDN behavior, or supply-chain compromise. The browser executes the returned code with the same client-side privileges as the report's own JavaScript. Loading the dependency additionally sends the viewer's IP address and HTTP request metadata to the external CDN. ### Attack Path 1. The report generator creates an HTML document containing the remote script reference. 2. A user opens the generated report while connected to the network. 3. The browser requests the current `chart.js@4` asset from jsDelivr. 4. A compromised upstream package, CDN account, distribution path, or unexpectedly changed release returns altered JavaScript. 5. The browser executes that remote JavaScript in the report context without verifying its cryptographic identity. ### Impact Assessment A successful dependency or CDN compromise could execute arbitrary JavaScript in every generated report opened while the malicious asset is served. The resulting capabilities are comparable to the stored-injection issue: - Modification or fabrication of report contents. - Phishing, redirection, and browser-origin data access. - Network requests from the viewer's browser. - Tracking of report viewers. This does not directly grant operating-system or Python-process privileges. The affected scope is the bro ...[truncated 93 chars]
Remediation
View remediation
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs the agent to write an HTML report to the local filesystem and invoke a Python script, but it does not declare any tool scope or permission boundaries. This creates an authorization gap where file read/write capable execution may occur without explicit limitation, increasing the chance of unintended file access or unsafe expansion of capability.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger set contains broad phrases like '比价', '省钱', and generic coupon-related queries that can match many ordinary conversations, causing the skill to activate when the user did not intend it. Unintended invocation can lead to unnecessary web searches, file generation, or execution of the reporting workflow in unrelated contexts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated HTML hard-codes lang="zh-CN" and all user-facing report text is in Chinese, including headings, labels, and warnings. This imposes a specific language/locale on all users without any opt-in, language selection, or clear documentation that the tool is intended only for a Chinese-language or region-specific audience.

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, making accidental activation likely in unrelated discussions about comparing prices. In this skill, accidental invocation matters because the workflow can perform web searches and produce output files, expanding the effect beyond a simple chat response.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The title, summary, triggers, examples, prompts, and workflow are entirely Chinese-focused, and the interaction rules prescribe Chinese follow-up prompts without mentioning any language selection. Under the policy, forcing a specific language without user opt-in can be a natural-language policy issue unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
78% confidence
Finding

The trigger '领券' is a common everyday phrase that could match many unrelated coupon conversations and invoke the skill unintentionally. This broad matching can cause unwanted searches for coupons or promotional content and start the report-generation workflow without clear user intent.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
79% confidence
Finding

The trigger '省钱' is highly generic and appears in many benign conversations unrelated to takeout or e-commerce comparison. Because this skill can launch searches and create artifacts, an overly broad trigger increases the chance of unnecessary tool use and unintended outputs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The skill directs the agent to generate an HTML file in outputs/ but does not require a user-facing warning or confirmation before writing the file. Even if the file path is fixed, silent artifact creation can surprise users, clutter the workspace, and normalize file-writing behavior without informed consent.

Content

No source excerpt is available for this finding.