Back to skill

Security audit

AI机票预订助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent flight-booking assistant, but it handles login tokens, personal identity data, and booking/refund actions with unsafe transport, storage, and confirmation controls.

Review this carefully before installing. It should not be used with real passenger data or live bookings until TLS verification is restored, the API endpoint is fixed or allowlisted, credentials are stored in a protected per-user secret store, temporary booking state is protected or eliminated, sensitive output is redacted, and order cancellation/refund/rescheduling require explicit final confirmation tied to the exact order and fees.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/common.py:160
Finding

TLS Certificate Verification Is Disabled for Sensitive API Requests

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/common.py:15
Finding

Environment-Controlled API Endpoint Can Redirect Credentials and PII

Content
View full analysis
") return None api_url = get_api_url() payload = { "methodName": method_name, "apiKey": api_key, "businessParams": json.dumps(business_params), **extra_params } headers = { "Content-Type": "application/json" } try: data = json.dumps(payload).encode('utf-8') req = urllib.request.Request(api_url, data=data, headers=headers, method='POST') context = ssl._create_unverified_context() with urllib.request.urlopen(req, context=context) as response: response_data = response.read().decode('utf-8') return json.loads(response_data) ``` ### Technical Analysis `FBT_API_URL` is accepted without validating its scheme, hostname, port, path, or ownership. The authenticated request wrapper then sends the API key and business payload to that destination. The unauthenticated wrapper has the same endpoint-selection behavior and can transmit phone numbers and verification codes. The issue is particularly severe because TLS certificate verification is also disabled. A configurable endpoint can be legitimate in a development environment, but production handling of credentials and identity data requires a strict destination trust boundary. The current implementation allows any process capable of influencing the inherited environment to redefine that boundary. ### Attack Path ...[truncated 1104 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/common.py:20
Finding

Long-Lived API Credentials Are Stored in an Unsafe Shared Temporary File

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/create_order.py:90
Finding

Passenger PII and Verification Secrets Are Exposed Through Process Arguments and Console Output

Content
View full analysis
") print("Example: python3 create_order.py 1 \"Example Name\" \"13800138000\" \"110101199001011234\"") sys.exit(1) seat_index = sys.argv[1] passenger_name = sys.argv[2] passenger_phone = sys.argv[3] passenger_id = sys.argv[4] print(f"\nCreating order...") print(f"Seat index: {seat_index}") print(f"Passenger name: {passenger_name}") print(f"Passenger phone: {passenger_phone}") print(f"Passenger identity number: {passenger_id}") ``` Order lookup prints complete PII returned by the service: ```python for idx, passenger in enumerate(passenger_list, 1): passenger_info = passenger.get("passengerInfo", {}) name = passenger_info.get("name", "") phone = passenger_info.get("phone", "") id_card = passenger_info.get("identity_no", "") id_type_name = passenger_info.get("identity_type_name", {}).get("value", "") ticket_no = passenger.get("ticketNo", "") if name: print(f" - Name: {name}") if phone: print(f" - Phone: {phone}") if id_card and id_type_name: print(f" - Identity type: {id_type_name}") print(f" - Identity number: {id_card}") if ticket_no: print(f" - Ticket number: {ticket_no}") ``` Authentication also accepts the one-time verification code through `sys.argv`: ```python elif action == "verify": if len(sys.argv) != 4: print("Usage: python3 auth.py verify ") sys.exit(1) phone = sys.argv[2] ...[truncated 1809 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/search_price.py:24
Finding

Predictable Shared Temporary State Allows Booking and Rescheduling Data Tampering

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (36)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description omits that the skill performs SMS-based authentication, verification, local apiKey storage, and auth status inspection. Hidden auth and credential-handling behavior is security-relevant because users and platform policy engines may not realize the skill is collecting a phone number, sending login codes, and persisting credentials locally.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The description omits that the skill performs SMS-based authentication, verification, local apiKey storage, and auth status inspection. Hidden auth and credential-handling behavior is security-relevant because users and platform policy engines may not realize the skill is collecting a phone number, sending login codes, and persisting credentials locally.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description omits that the skill performs SMS-based authentication, verification, local apiKey storage, and auth status inspection. Hidden auth and credential-handling behavior is security-relevant because users and platform policy engines may not realize the skill is collecting a phone number, sending login codes, and persisting credentials locally.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This code sends authentication data and likely PII such as phone, name, and ID card information over HTTPS while explicitly disabling certificate verification, defeating the main protection HTTPS is supposed to provide. In the context of a flight-booking skill, intercepted or modified traffic could expose identity data, hijack accounts, or alter bookings and refunds.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares executable capabilities that include network access plus local file read/write behavior, but it does not declare any explicit tool scope or permission boundaries. In a booking workflow that handles authentication state and passenger PII, missing scope constraints increases the chance of overbroad agent execution, unintended data access, or unsafe invocation of local scripts.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

整个技能说明、触发词、输出格式和示例均默认且实质上只支持中文交互,没有说明可根据用户偏好切换语言,也没有提供语言选择或中文限定的业务理由。对于通用机票助手,这构成了对特定语言的默认强制。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Booking trigger phrases such as '订这个' or '下单' are ambiguous in conversational context and can overlap with exploratory or hypothetical user intent. In a flow that transmits passenger PII and creates payable orders, ambiguous triggers can lead to unintended order creation and unnecessary disclosure of sensitive information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The cancel-order trigger includes broad conversational language such as '不要了', which can appear in ordinary discussion and be misinterpreted as authorization to cancel a live order. Because cancellation is a state-changing action that can affect bookings and finances, overbroad trigger phrases materially increase the risk of accidental destructive execution.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The refund submission trigger includes generic phrases like '退票', which can refer to asking about refund policy rather than authorizing a refund action. Given that refunds are irreversible or difficult-to-reverse transactional operations, this ambiguity can cause unauthorized or accidental submission of a refund request.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The end-to-end examples use command parameters that differ from the earlier tool definitions, including extra phone arguments for order/detail/cancel/endorse/refund flows. In an agentic system, inconsistent invocation specs can cause operators or models to call the wrong command shape, potentially sending extra PII, failing open, or performing the wrong state-changing action.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The refund flow documentation is contradictory: one part requires mandatory user confirmation before submitting a refund, while the display example says the system will automatically submit the refund application. In a skill that performs financially consequential state changes, contradictory guidance can lead an agent to execute unintended refunds without clear consent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes flight search, cabin query, booking, ticket rescheduling, and ticket refund. This script performs an order cancellation via the "cancelOrder" API, which is not explicitly included in that stated scope and is semantically distinct from ticket refund.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains multiple hard-coded Chinese user-facing strings, including error and usage messages, with no indication that the skill is intended only for Chinese-speaking users or a specific locale. That creates a natural-language policy concern because the skill enforces a language choice without opt-in or justification.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module stores the apiKey and phone number in a predictable file under the system temporary directory, which is often less protected and may be accessible to other local users or processes depending on platform configuration. This creates a local credential exposure risk and extends token lifetime to 90 days without additional protection.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code explicitly creates an unverified SSL context before sending API requests, which disables TLS certificate validation and allows man-in-the-middle interception or tampering of traffic. Even though this path is used for unauthenticated calls, it can still expose phone numbers, OTP-related data, and permit spoofed server responses during the auth flow.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
100% confidence
Finding

The authenticated API path also disables TLS certificate verification, which means apiKey values and passenger data sent in requests can be intercepted or modified by an active network attacker. Because this function is used for booking-related operations, a MITM could steal credentials, alter order details, or return forged responses.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The function sends passenger name, phone number, and ID card information to the createOrder API. While the code performs the action as part of order creation, there is no visible warning, comment, or disclosure explaining that sensitive personal data will be transmitted to a remote service.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script prints the passenger's full phone number and full ID-card number directly to stdout during order creation. In CLI, agent, or logged execution environments, stdout is often captured in logs, transcripts, or telemetry, so this unnecessarily exposes highly sensitive PII beyond what is required to complete ticket booking.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script echoes full phone and ID numbers to stdout without masking or warning. Because agent skills commonly run in environments with centralized logs or chat transcripts, this creates avoidable secondary disclosure of sensitive personal data that can enable identity theft, account takeover workflows, or privacy violations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script prints the full endorsement request payload just before submitting it, which includes sensitive internal identifiers such as order_id and ticket_ids and may also include detailed seat/segment data. In a flight-booking skill, these values are not necessary for normal user-facing output, and exposing them to logs, terminal history, or calling orchestration layers can leak booking metadata that could be reused for unauthorized support interactions, correlation of traveler records, or privacy violations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Sensitive order and ticket data is emitted to stdout without masking or user consent before the API call. In agent and automation environments, stdout is often captured centrally, surfaced to operators, or persisted in transcripts, so this creates a realistic data-exposure path beyond the immediate local process.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

User-facing messages, examples, and comments are written entirely in Chinese, and the script provides no opt-in or alternative locale. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script's docstrings, usage text, status messages, and output labels are all presented only in Chinese. This imposes a fixed language on all users with no opt-in, selection mechanism, or documented justification that the skill is intended solely for a Chinese-language context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script writes flight and seat-selection data to a temporary JSON file on disk without any visible consent, retention control, or access restriction checks. In a flight-booking context, this can expose travel itinerary metadata and booking-related information to other local users, processes, or later runs if the temp file is world-readable, predictable, or not cleaned up.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script submits a refund request immediately after fetching order details and deriving product IDs, without any explicit confirmation, dry-run, or secondary check before invoking the refund API. In a flight-booking skill, refunds are financially sensitive and potentially irreversible or time-consuming to undo, so accidental invocation, argument mix-ups, or misuse by another component can cause unintended cancellations and monetary loss.

Content

No source excerpt is available for this finding.