T09 · Insecure Skill Coding Practices
- Location
scripts/common.py:157- Finding
TLS Certificate Validation Is Disabled for All API Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This flight-booking skill is mostly purpose-aligned, but it handles credentials, personal data, payments, changes, and refunds with unsafe storage, weak network protections, and unclear confirmation boundaries.
Review carefully before installing. Use only in a trusted local environment, avoid shared machines, assume terminal output and process arguments may expose passenger identity details, and do not use it for real bookings, changes, or refunds until TLS verification, credential storage, endpoint validation, redaction, and explicit confirmation safeguards are fixed.
scripts/common.py:157TLS Certificate Validation Is Disabled for All API Requests
scripts/common.py:15Environment-Controlled API Endpoint Can Exfiltrate Credentials and Passenger Data
scripts/common.py:20API Key and Phone Number Are Stored in an Unsafe Predictable Temporary File
scripts/create_order.py:89Verification Codes and Passenger PII Are Exposed Through Process Arguments and Console Output
scripts/search_price.py:24Predictable Temporary Booking-State Files Can Be Tampered With Before Transaction Submission
The declared description focuses on flight assistance, but the skill also performs authentication flows involving SMS verification, apiKey issuance, and local credential persistence. Hidden or under-disclosed auth and secret-handling behavior reduces transparency and can mislead operators about what sensitive actions and data storage the skill performs.
The declared description focuses on flight assistance, but the skill also performs authentication flows involving SMS verification, apiKey issuance, and local credential persistence. Hidden or under-disclosed auth and secret-handling behavior reduces transparency and can mislead operators about what sensitive actions and data storage the skill performs.
The declared description focuses on flight assistance, but the skill also performs authentication flows involving SMS verification, apiKey issuance, and local credential persistence. Hidden or under-disclosed auth and secret-handling behavior reduces transparency and can mislead operators about what sensitive actions and data storage the skill performs.
The code explicitly disables TLS certificate verification for outbound API requests by using an unverified SSL context. This allows a man-in-the-middle attacker to intercept or modify flight search, booking, refund, and authentication traffic, including apiKey and passenger-related data, which is especially dangerous given this skill handles travel transactions.
The skill invokes Python scripts that can access the network, read/write local files, and potentially inspect environment data, yet it declares no explicit tool scope or permissions boundary. This creates an over-privileged integration surface where a host agent may allow capabilities beyond what users and reviewers expect, increasing the chance of data exposure or unintended side effects.
The manifest description and the rest of the markdown are written as a Chinese-only interaction pattern, and no language-choice or opt-in behavior is described. Under the stated policy, forcing a specific language without user choice is a natural-language policy concern unless the locale restriction is clearly documented and justified.
Using the broad trigger phrase '预订' can cause the skill to activate on casual planning or informational requests that do not indicate consent to place an order. In a booking context tied to PII collection and external service calls, ambiguous invocation increases the chance of premature transactional behavior.
Using the broad trigger phrase '退票' for a destructive flow is dangerous because users may be asking about rules or fees rather than authorizing cancellation/refund processing. In this skill, refund actions affect existing paid travel and can be irreversible or costly, so ambiguous intent handling materially raises the risk of unauthorized destructive operations.
The full-process examples use command signatures that differ from the earlier defined interfaces, including extra phone parameters in several order-related operations. In security-sensitive flows, signature inconsistencies can cause the agent to pass the wrong data, mishandle identity binding, or invoke scripts in unintended ways, increasing risk of erroneous destructive actions or PII leakage.
The skill states that refund submission must require explicit user confirmation, but the sample output says the system will automatically submit the refund request after agreement. Contradictory instructions in a destructive flow can lead an agent to take irreversible refund actions without a clear confirmation boundary.
The module docstring is entirely in Chinese and the CLI messages throughout the file are presented only in Chinese, indicating a fixed language experience. There is no indication that users can opt into another language or that the skill is intentionally restricted to a Chinese-only regional context, which matches the language/locale policy violation criteria.
The skill stores the apiKey and phone number in a predictable file under the system temporary directory, which is often accessible to other local users, processes, or cleanup tools depending on platform configuration. Because the file contains reusable authentication material and PII, local disclosure could enable unauthorized API use or account misuse.
The function sends the stored API key and business parameters over the network to a remote API endpoint. While this is part of the helper's function, the code itself provides no user-facing disclosure that authentication data and request contents are transmitted to an external service.
The script prints the passenger's full name, phone number, and government ID number directly to stdout before creating the order. In CLI, agent, or logged execution environments, stdout is often captured in terminal history, orchestration logs, transcripts, or monitoring systems, which can expose personally identifiable information and increase privacy, compliance, and identity-theft risk.
Natural-language strings throughout the script, including docstrings, status messages, errors, and usage text, are written only in Chinese. This imposes a single language on all users with no opt-in, fallback, or explanation that the tool is intended exclusively for a Chinese-speaking or region-specific environment.
The script prints the full endorsement request payload before calling the API, which can expose sensitive booking data such as order IDs, ticket/product identifiers, and detailed segment information in terminal logs, orchestration logs, or shared execution environments. In a flight-booking skill, these identifiers are tied to real customer travel operations, so leaking them increases privacy and account abuse risk even if they are not direct authentication secrets.
This Python file contains natural-language comments, usage text, status messages, and output labels entirely in Chinese. Because the skill does not offer any user opt-in or alternative locale, it appears to enforce a specific language, which matches the policy-violation category for language or locale constraints.
This code contains natural-language comments, help text, status messages, and prompts only in Chinese, such as the usage output and interactive instructions. Under the policy, forcing a specific language without offering a user language/locale choice can be a natural-language policy violation.
The script retrieves and prints highly sensitive booking data including passenger names, phone numbers, identity document numbers, and ticket numbers directly to stdout with no masking, consent check, or warning. In an agent skill context, stdout may be surfaced to users, logs, transcripts, or operator tooling, so exposing full PII can cause privacy violations and unauthorized disclosure even if the underlying API call is legitimate.
The script submits a refund request immediately after fetching order details, with no confirmation prompt, no explicit warning that the action is financially impactful, and no validation that the refund amount or passenger selection is intended. In a flight-booking skill, refunds are operationally significant and may be irreversible or costly once sent to the backend, so accidental execution can directly affect customer bookings and finances.
This Python file contains natural-language comments, docstrings, usage text, and status output entirely in Chinese, including the command help and result messages. Under the policy for natural-language violations, forcing a specific language without user opt-in is a locale/language policy issue unless the tool is clearly documented as region-specific, which is not shown here.
The module docstring and all user-facing messages in the script are in Chinese, and the skill provides no option for users to select another language or locale. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the regional constraint is explicitly justified.
The skill description advertises a wide range of flight-related actions, including booking, rescheduling, and refunds, but does not define explicit trigger conditions, scope boundaries, or user-intent constraints. In an agent ecosystem, broad activation language can cause the skill to be invoked for loosely related travel conversations, increasing the chance of unintended transactional behavior or over-collection of user data.
The script's user-facing strings are written entirely in Chinese, including error text, usage instructions, and status messages. Because the file provides no user opt-in or configurable locale selection, it appears to enforce a specific language, which matches the language/locale policy violation category.
The module description and all user-facing strings are written only in Chinese, with no indication that the skill is region-specific or that other language options are supported. Under the stated policy, forcing a specific language without opt-in can be a locale-policy issue.