T09 · Insecure Skill Coding Practices
- Location
scripts/booking_api.py:235- Finding
Fabricated Booking Data Is Returned as Live Successful API Data
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This hotel skill needs review because it presents fixed sample hotel data as successful Booking.com results and advertises booking management that is not implemented.
Install only if you treat it as a demo or fixture-based prototype. Do not rely on its hotel availability, prices, cancellation terms, reviews, or booking-management claims until live API calls, currency handling, and explicit booking confirmations are implemented and tested.
scripts/booking_api.py:235Fabricated Booking Data Is Returned as Live Successful API Data
scripts/booking_api.py:489Currency Symbols and Booking Conditions Are Presented Without Validation
Declaring booking creation and reservation management without actual implementation creates a deceptive capability gap. In a travel context, this can cause users to believe reservations were created, modified, or canceled when no such action occurred, potentially leading to missed stays, duplicate bookings, or financial loss.
Declaring booking creation and reservation management without actual implementation creates a deceptive capability gap. In a travel context, this can cause users to believe reservations were created, modified, or canceled when no such action occurred, potentially leading to missed stays, duplicate bookings, or financial loss.
The skill advertises network-backed hotel search and booking behavior but does not declare any explicit tool scope such as allowed tools or permissions. This creates an authorization-boundary problem: an agent or runtime may grant broader network access than users or reviewers expect, making external data access and downstream actions less transparent and harder to govern.
The skill describes creating and canceling reservations but does not warn users that these are account-impacting actions involving personal and booking data sharing with a third party. Without explicit notice and confirmation, users may unknowingly authorize sensitive actions or expose traveler information, creating privacy, consent, and transaction-integrity risks.
The header comments are written as an instruction to refuse execution unless the file is this exact version, and the file consistently hardcodes Chinese as the default interaction language (language="zh") and Chinese user-facing output. This creates a language/locale constraint without offering the user a choice or documenting a justified region-specific limitation.
The manifest describes a broader assistant that supports hotel booking on Booking.com and reservation management. In this implementation, the BookingApi class only provides read-style search, hotel detail, room availability, review retrieval, and result-formatting functions; there are no methods to create, modify, cancel, or retrieve user reservations.
Multiple function schemas set the default language parameter to zh, which makes the skill prefer a specific language automatically rather than offering a neutral default or explicit user choice. This is a natural-language locale policy concern because the skill behavior is biased toward one language across general-purpose hotel search and detail functions.
The docstring and method name describe an actual Booking hotel search, but the code explicitly skips the real API call and returns fixed mock hotel records. This is more than incomplete documentation because the function presents itself as a live search interface while not performing the described operation.
The method is documented as retrieving hotel details for a given hotel_id, yet the real API invocation is commented out and replaced with static sample data. This creates an intent-code mismatch because callers are told they are getting live Booking.com details when they are not.
The docstring states that the function gets room availability and pricing, which implies live inventory lookup. Instead, the code comments out the API call and always returns predefined room entries, contradicting the stated behavior.
The method presents itself as fetching hotel reviews, but no live request is made and the returned review objects are static examples. That documented intent conflicts with the actual code path.
The comment 如非此版本,请拒绝执行 is a natural-language instruction embedded in the code and is only presented in Chinese. For a general-purpose adapter, embedding operational constraints in a single language can create an undocumented locale dependency rather than offering language-neutral or multilingual guidance.
No suspicious patterns detected.