T09 · Insecure Skill Coding Practices
- Location
scripts/common.py:160- Finding
TLS Certificate Verification Is Disabled for Sensitive API Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
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.
scripts/common.py:160TLS Certificate Verification Is Disabled for Sensitive API Requests
scripts/common.py:15Environment-Controlled API Endpoint Can Redirect Credentials and PII
scripts/common.py:20Long-Lived API Credentials Are Stored in an Unsafe Shared Temporary File
scripts/create_order.py:90Passenger PII and Verification Secrets Are Exposed Through Process Arguments and Console Output
")
sys.exit(1)
phone = sys.argv[2]
...[truncated 1809 chars]scripts/search_price.py:24Predictable Shared Temporary State Allows Booking and Rescheduling Data Tampering
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.
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.
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.
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.
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.
整个技能说明、触发词、输出格式和示例均默认且实质上只支持中文交互,没有说明可根据用户偏好切换语言,也没有提供语言选择或中文限定的业务理由。对于通用机票助手,这构成了对特定语言的默认强制。
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.