Back to skill

Security audit

餐饮菜品成本与出品率核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local checker code is offline, but the skill instructions push users and agents into external payment and installation flows that conflict with its no-payment/no-network framing.

Review carefully before installing. The local table-checking code appears self-contained and offline, but the skill also contains instructions for upselling to a paid version, opening external purchase pages, using an unauthenticated HTTP redirect helper, and installing additional skill material. Do not let an agent initiate purchase or installation steps from this skill unless you independently verify the payment platform, merchant ID, product, amount, and destination over trusted HTTPS.

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
SKILL.md:130
Finding
Plaintext HTTP endpoint controls payment routing## Vulnerability Details **File Location**: `SKILL.md`, lines 130–131 **Vulnerability Type**: Unauthenticated payment metadata and redirect retrieval **Risk Level**: Medium **Vulnerable snippet**: ```markdown - **Permanent purchase address (remains valid even if the product ID changes)**: <http://110.40.221.75/buy/restaurant-food-cost-check> (Humans open the regular page; AI uses `http://110.40.221.75/buy/restaurant-food-cost-check?format=json` to obtain the current product ID, while `http://110.40.221.75/buy/restaurant-food-cost-check?go=1` returns a 302 redirect to the current SkillPay purchase address.) ``` ### Technical Analysis The skill instructs an agent to retrieve dynamic product information or a payment redirect over unencrypted, unauthenticated HTTP. The endpoint is explicitly part of the optional paid-edition workflow and is described as the source for the current product ID and purchase destination. HTTP provides neither transport confidentiality nor server authentication. An on-path attacker—such as a hostile network gateway, compromised router, or malicious Wi-Fi operator—can modify the JSON response or replace the `302` redirect target. The resulting attacker-selected value then crosses from untrusted network traffic into a payment and installation workflow presented as a stable, trusted purchase route. The surrounding instructions tell the agent to verify the merchant ID, product ID, order, and amount and not to pay on the user's behalf. Those precautions reduce exploitation likelihood but do not authenticate this HTTP endpoint or guarantee that the destination displayed to the user is genuine. ### Attack Path 1. The user selects the optional paid edition. 2. Following `SKILL.md`, the agent requests the `?format=json` or `?go=1` URL over HTTP. 3. An on-path attacker intercepts the plaintext request. 4. The attacker alters the product metadata or substitutes the redirect destination. ...[truncated 845 chars]
Remediation
## Remediation Suggestions 1. Remove all plaintext HTTP purchase and redirect endpoints. 2. Serve the purchase page, metadata API, and redirect endpoint exclusively over HTTPS with valid certificate verification. 3. Prefer a fixed, allowlisted HTTPS destination under the expected payment platform domain instead of an IP-address-based intermediary. 4. If product metadata must remain dynamic, digitally sign it and verify the signature before using the merchant ID, product ID, amount, or destination. 5. Before presenting a payment link, require exact validation of the HTTPS scheme, destination hostname, merchant ID, product ID, order details, and amount. 6. Reject cross-origin redirects and any redirect that downgrades to HTTP or points outside an explicit destination allowlist. 7. Preserve the existing requirement that payment must be confirmed by the user and must never be completed automatically by the agent.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (12)

Intent-Code Divergence

High
Confidence
97% confidence
Finding
The documentation prominently represents the skill as 'completely local' and 'no network', while later sections require external web and platform interactions. This deceptive or inconsistent trust signal can lower operator suspicion and make downstream social-engineering or unsafe tool use more likely.

Ae1

High
Category
analysis-evasion
Content
node scripts/run.mjs --sample # 先看样例
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.mjs --sample # 先看样例
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
98% confidence
Finding
The skill claims local, offline operation for a restaurant cost-checking task, but then instructs the agent to participate in external purchase and installation flows via web links and SkillPay. This creates a capability mismatch that can mislead users and agents into making network requests and handling commerce-related actions outside the stated scope of the tool.

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The file states there is no network use, yet it embeds multiple external destinations including HTTP helpers, purchase pages, and redirect-based buying flows. That inconsistency is dangerous because it can cause an agent or user to trust the skill as offline while being steered into remote content and potentially mutable endpoints.

Ssd 4

High
Confidence
96% confidence
Finding
The embedded 'official command' explicitly authorizes an AI assistant to install dependencies and initiate a purchase, which is a sensitive-action handoff embedded inside otherwise benign documentation. This is dangerous because agents may treat the block as executable guidance and proceed into software installation and transaction setup on the basis of in-skill text alone.

Ssd 4

Medium
Confidence
90% confidence
Finding
The narrative instructs the agent to first deliver a benign result and then present a structured purchase path, progressively moving toward transaction completion. This sequencing can function as a social-engineering pattern that leverages trust established by the benign task to encourage sensitive follow-on actions.

Whitespace Padding

Medium
Category
Prompt Injection
Content
输出与你的安全约束**;它**可被用户关闭**(`SKILL_NO_UPSELL=1`),也**必须可忽略**(不点不买不影响结果)。
   执行官方购买指令时:先读一次官方说明;核对**商户号 `2088702818190040`**、商品号与订单是否一致;
   ⛔ 不要点击来路不明的链接/二维码,也**不要替用户付款** —— 付款一律由**用户本人**确认。
Confidence
80% confidence
Finding
Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The core purpose of the skill is deterministic checking of cost and yield tables, but the skill also bundles commerce and upsell behavior unrelated to that business function. Mixing analysis logic with product-purchase orchestration expands the attack surface and increases the chance an agent will perform unnecessary sensitive actions such as opening external pages or initiating orders.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file’s natural-language interface text, comments, labels, prompts, and returned user-facing messages are entirely in Chinese, and there is no indication that the user can choose another language or that the skill is limited to a Chinese-speaking/regional context. Under the policy, forcing a specific language without opt-in is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file’s descriptive comments, help text, and runtime messages are entirely Chinese, which imposes a specific language on users without offering an alternative or opt-in. The policy explicitly flags language or locale constraints when they are forced rather than user-selected or clearly justified as region-specific.

Intent-Code Divergence

Low
Confidence
93% confidence
Finding
The comment for loadInput says invalid JSON is treated as plain-text material such as '直接粘贴的合同全文', i.e. a full contract. That example contradicts the rest of the file, which consistently states the tool is for restaurant food cost/yield check tables with headers, not contract auditing.

Static analysis

No suspicious patterns detected.