Back to skill

Security audit

瑞玥餐饮API2

Security checks for vulnerabilities and agentic risk

Overview

This restaurant skill is mostly purpose-aligned, but it can perform live booking, ordering, cancellation, member, transaction, and payment-link operations over an insecure default backend connection.

Install only in a controlled internal environment after changing the API base to HTTPS, enforcing confirmation for all booking/order/cancel/payment-link actions, tightening tool trigger rules, and validating identifiers such as memberId before they are placed into URL paths.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
handlers/_http.js:1
Finding

Cleartext HTTP Transport Exposes Sensitive Customer and Business Operations

Content
View full analysis
{ if (v !== undefined && v !== null && v !== '') { url.searchParams.set(k, String(v)); } }); } const normalizedBody = body ? withDefaults(body) : null; if (normalizedBody) { const shopErr = ensureShopId(normalizedBody); if (shopErr) { return shopErr; } } const init = { method, headers: { Accept: 'application/json', ...(normalizedBody ? { 'Content-Type': 'application/json' } : {}), ...(normalizedBody ? buildContextHeaders(normalizedBody) : {}), ...(headers || {}), }, }; if (normalizedBody) { init.body = JSON.stringify(normalizedBody); } const response = await fetch(url.toString(), init); ``` ### Technical Analysis The default backend endpoint uses unencrypted HTTP. All handlers rely on the shared `request` function, so this transport affects both read-only requests and state-changing operations. Requests may carry the following information in ...[truncated 2402 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
handlers/getMemberInfo.js:9
Finding

Unvalidated Member Identifier Permits Same-Origin API Path Manipulation

Content
View full analysis
{ if (v !== undefined && v !== null && v !== '') { url.searchParams.set(k, String(v)); } }); } const normalizedBody = body ? withDefaults(body) : null; if (normalizedBody) { const shopErr = ensureShopId(normalizedBody); if (shopErr) { return shopErr; } } const init = { method, headers: { Accept: 'application/json', ...(normalizedBody ? { 'Content-Type': 'application/json' } : {}), ...(normalizedBody ? buildContextHeaders(normalizedBody) : {}), ...(headers || {}), }, }; if (normalizedBody) { init.body = JSON.stringify(normalizedBody); } const response = await fetch(url.toString(), init); ``` ### Technical Analysis `memberId` is accepted as a general string and inserted directly into the URL path. The code performs neither strict forma ...[truncated 2450 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (37)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill exposes high-risk capabilities through tools and documented API access patterns, including network access, internal service endpoints, environment-derived identifiers, and write actions such as booking, ordering, cancellation, and payment-link generation, but it does not declare an explicit tool scope or allowed-tools boundary. That weakens least-privilege controls and makes it easier for an agent or future maintainer to invoke unintended capabilities beyond the minimum needed for a given task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill repeatedly requires silent background tool execution while supporting state-changing actions such as reservation booking, modification, cancellation, ordering, reducing items, and payment-link generation, yet it provides no user-facing consent or confirmation warning at execution time. This creates a real risk of unauthorized or surprising transactions, especially because the skill also suppresses disclosure of the execution process and instructs the agent to proceed silently once it has enough information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The instruction '禁止输出英文' and '仅允许中文业务话术' imposes a fixed language policy on all responses. This is a natural-language policy violation because it does not offer user opt-in or explain a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Line L009 requires all replies to customers to follow a fixed output format in Chinese-context wording and the entire prompt is written as a hard requirement for one language/locale, with no mechanism for asking the user their preferred language. This can violate language/locale policy when the skill is used with users who prefer or require another language.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file reads multiple environment variables, including identifiers and a phone value from RY_DRINK2_LINK_PHONE, and those values can be injected into request headers and request bodies. This code file does not provide any explicit warning or documentation that environment-sourced identifiers and phone data may be used in network operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code builds context headers including X-Tenant-Id, X-Shop-Id, and X-Mobile, then sends them in outbound fetch requests. There is no confirmation prompt, logging, or user-facing comment/docstring in this file warning that user or system identifiers are transmitted over the network.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This handler implements a payment-link generation action that can trigger a write/transactional backend operation, but the skill description only explicitly mentions reservation, ordering, and item-reduction writes. That mismatch weakens operator and user understanding of the skill’s real capabilities, increasing the chance of unintended invocation of a sensitive payment-related action without proper review or consent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

At L19, the function sends a POST request containing identifiers such as tenantId, shopId, order-related IDs, and linkPhone to a remote endpoint. In this file there is no confirmation prompt, logging, comment, or docstring disclosing that user/system data will be transmitted over the network.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This handler sends a POST request to cancel an appointment, which is a destructive operation affecting user data/state. The file contains no confirmation prompt, user-facing disclosure, or explanatory comment/log indicating that cancellation will occur when invoked.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This handler exposes an order-cancellation write operation even though the declared skill capabilities only mention reservations, ordering, and item reduction. In an agent setting, undeclared destructive actions increase the chance of unintended or unauthorized invocation because policy, review, and user expectations may not account for cancellation behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The code performs a destructive POST cancellation request without any explicit user-confirmation or disclosure mechanism visible at this layer. In a tool-driven agent workflow, silent execution of cancel actions can cause irreversible business impact if triggered by prompt confusion, misrouting, or malicious instruction injection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code posts reservation details including reserveId, linkNickname, linkPhone, dineDate, and dineTime to a remote endpoint. There is no confirmation prompt, logging/print statement, or explanatory comment/docstring in this file disclosing that user data is being transmitted.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This code performs an HTTP GET to fetch member information, which likely involves customer data, but there is no confirmation prompt, log message, or inline documentation disclosing that sensitive data is being accessed. For code files, safety-relevant data access and transmission should include some visible warning unless clearly disclosed elsewhere in the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code performs an HTTP GET to /transaction/list and sends identifiers such as memberId, saasId, tenantId, shopId, and context headers. In this file there is no confirmation prompt, logging, comment, or docstring disclosing that user or tenant-related data is being transmitted over the network.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code sends linkPhone in a GET request query to /aiemployees/appointment/list, which is user data and potentially sensitive personal information. There is no confirmation prompt, user-facing log, or inline warning indicating that the phone number will be transmitted to a backend service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This handler sends tenant, SaaS, reservation, and order identifiers to backend dining endpoints, which may expose user or account-related data. There is no confirmation prompt, visible user-facing log, or explanatory comment/docstring in this file disclosing that these identifiers are transmitted over the network.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code sends reserveId, goods, and shop-related identifiers to a remote endpoint via request('POST', ...). In this file there is no confirmation prompt, logging/print statement, or explanatory comment/docstring disclosing that user/order data will be transmitted, so the network operation lacks visible warning context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents write operations such as booking changes, cancellations, order placement, order reduction, and order cancellation, but it does not warn users that these actions can modify or cancel live reservations/orders. The file notes that related query tools should run first, yet that is an execution prerequisite rather than a user safety warning about data-impacting behavior.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
93% confidence
Finding

The file includes a concrete curl example that transmits booking data, including a phone number, over plain HTTP to an internal IP. Even on an internal network, cleartext transport exposes sensitive business and personal data to interception, and the example may encourage insecure deployment defaults because the documented primary API base is also non-TLS HTTP.

Content

Scanner excerpt · tool-router.md (reported line 74)May include surrounding context.

验证 bookTable

bash
curl -X POST "http://192.168.0.66:9302/aiemployees/appointment/booking" \
  -H "Content-Type: application/json" \
  -d '{"saasId":"sf8b00e05","tenantId":5,"shopId":"8","linkNickname":"测试","linkPhone":"13800138000","dineDate":"2026-06-23","dineTime":"20:00","tableCode":"HH-A01","personNum":2}'

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The tool descriptions define broad natural-language triggers such as asking about shop info, tables, menu items, recommendations, or payment, with mandatory tool invocation but without clear scope boundaries or disambiguation rules. In an agent setting, this can cause over-triggering on loosely related user utterances, leading to unnecessary access to business or personal data and accidental execution of sensitive read/write operations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Across the manifest, ambiguous phrases like 'menu', 'recommend', 'my appointments', 'I ordered what', and payment-related prompts are used as mandatory triggers for tools that expose personal data or modify reservations and orders. Because this is a restaurant skill handling appointments, phone-linked records, member balances, transaction history, and order changes, ambiguous matching increases the risk of privacy leakage, cross-user record access, and unintended bookings, cancellations, or payments if the agent resolves intent incorrectly.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The returned error string is written only in Chinese: orderId 与 goods 不能为空. This imposes a language choice in user-facing natural language without offering opt-in, fallback, or documentation that the skill is intentionally Chinese-only.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The function transmits order-related data in body via an HTTP POST request, which is a network operation involving user or system data. In this file there is no confirmation prompt, logging, print statement, or comment/docstring disclosing that the data will be sent externally.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The returned error messages at L8, L11, and L16 are written only in Chinese, which imposes a specific language on users. There is no indication in this file that the skill offers a locale choice, opt-in, or that the language restriction is intentionally documented as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The returned error strings use Chinese only, which constitutes a language-specific behavior in user-visible natural language. There is no indication in this file that users can choose their language or that the skill is intentionally limited to a Chinese-speaking context.

Content

No source excerpt is available for this finding.