T09 · Insecure Skill Coding Practices
- Location
scripts/booking_api.py:450- Finding
Production Functions Return Fabricated Booking.com Data as Successful Live Results
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Booking.com skill appears to return fabricated hotel, room, price, and review data as successful results, so it should be reviewed before use.
Treat this as a demo or stub, not a reliable Booking.com assistant. Do not use it for real travel decisions, budgets, bookings, cancellations, or availability checks unless the publisher removes the mock data paths, restores verified live API calls, and narrows the description to implemented capabilities.
scripts/booking_api.py:450Production Functions Return Fabricated Booking.com Data as Successful Live Results
The description claims a fuller Booking.com assistant supporting search, room lookup, price comparison, booking management, and reservation handling. The code does align partially with hotel search and room availability/detail lookup, but its primary implemented behavior is a read-only, mostly mocked data interface. There are no functions for placing bookings, modifying/canceling reservations, or managing existing orders. The 'price comparison' claim is also not materially implemented beyond displaying returned prices from mocked Booking hotel results. Additionally, review retrieval is implemented though not highlighted in the description. Because key declared end-user capabilities—especially booking and reservation management—are missing, this is a material description-behavior mismatch.
The implemented code is clearly Booking.com-related and aligned with hotel discovery use cases: searching hotels, fetching hotel details, checking room availability/prices, getting reviews, and formatting results. However, the declared description also claims support for '预订管理' and says to invoke when the user wants to 'book hotels on Booking.com' or manage reservations. In this code chunk, there are no functions for placing a booking, retrieving an existing reservation, modifying it, or canceling/managing reservations. So the primary domain matches, but the declared functionality overstates the implemented capabilities in a material way.
The skill explicitly depends on external Booking.com APIs and therefore has network capabilities, but it does not declare any tool scope, permissions, or allowed-tools constraints. That creates an authorization and review gap: the runtime may grant broader network access than intended, making it harder to enforce least privilege or audit what destinations the skill is allowed to contact.
The skill advertises reservation creation, lookup, and cancellation without warning that these actions may transmit personal data to a third party or have real transactional consequences. In a travel-booking context, this raises the risk of users triggering bookings, cancellations, or sharing guest details without informed consent, which can lead to privacy, financial, and account-impact issues.
The file includes natural-language operational instructions in Chinese only ('如非此版本,请拒绝执行'), which imposes a specific language/locale context without any user opt-in or alternative language support. Under the policy rule, forcing a single language in instructions can be a locale-policy violation when no choice or justification is provided.
The skill metadata advertises Booking.com reservation booking and management capabilities, but this file only supports search, details, availability, reviews, and formatting. This mismatch can cause the agent to be invoked in transactional contexts it cannot safely fulfill, increasing the chance of misleading users or mishandling booking-related expectations.
The formatter unconditionally tells users that prices include taxes and that free cancellation is supported, even though those claims are not derived from the actual hotel or room data. In a travel-booking skill, this can mislead users into making purchase decisions based on false terms, creating financial, compliance, and trust risks.
The function schema sets the default language to "zh" and presents Chinese as the implicit output locale rather than offering a neutral default or requiring user choice. This is a natural-language locale policy concern because the skill imposes a specific language unless the caller explicitly overrides it.
Multiple function definitions default the language parameter to "zh", which means hotel details, room availability, and reviews will be returned in Chinese unless the user opts out. Repeated locale forcing across the skill strengthens the policy concern because no user-facing opt-in or justification is provided in this file.
The function dispatch logic uses kwargs.get("language", "zh") in several API calls, so the operational behavior enforces Chinese output whenever language is omitted. This is a direct locale-policy issue in executable code, not just documentation, because the implementation hard-codes the language choice without user opt-in.