T09 · Insecure Skill Coding Practices
- Location
scripts/ctrip_flight.py:111- Finding
Hardcoded Ctrip FVP Cookie Transmitted in Outbound Requests
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a Ctrip flight-search helper, but it ships and automatically sends a hardcoded Ctrip FVP cookie and tells users to paste their own cookie into source code.
Review before installing. This skill may be useful for Ctrip flight searches, but do not use the bundled cookie and do not paste personal browser cookies into tracked source files. If you proceed, use a disposable/runtime secret mechanism, confirm Ctrip terms and privacy implications, and avoid committing or sharing any modified script containing a cookie.
scripts/ctrip_flight.py:111Hardcoded Ctrip FVP Cookie Transmitted in Outbound Requests
The constructor silently injects a fixed FVP cookie into the session headers, causing every request to transmit embedded session-related data without user awareness. This exposes a hardcoded secret, may misuse a third party's session or tracking token, and can create privacy, account-abuse, or policy-violation risks if the token remains valid.
The documentation explicitly instructs users to use a preset authenticated FVP cookie and to manually extract and update that cookie in the script. This encourages credential-bearing scraping and normalizes embedding or reusing session-related data without discussing account security, privacy exposure, consent, or terms-of-service risks. In this skill’s context, the cookie is not incidental—it is part of the core access method—so the omission materially increases the chance of account/session misuse or accidental credential leakage.
This JSON manifest-like data is entirely localized in Chinese for human-readable fields such as airport names, cities, provinces, and regions. Because the file provides no accompanying indication that the skill is intentionally China/Chinese-locale specific or that users can choose another language, it can violate a language/locale policy that forbids forcing a specific language without user opt-in.
The docstring explicitly says the script uses a real cookie, and the implementation hardcodes a default cookie value that is automatically attached to outbound requests. Embedding session-related secrets in source code can leak another user's authenticated or tracking context, enables unauthorized reuse, and makes the secret broadly recoverable by anyone with code access.
The script performs requests to external Ctrip endpoints using a session that already contains the embedded cookie, but it provides no warning, consent flow, or indication that session-related data will be transmitted off-host. In this skill context, outbound scraping with a bundled cookie increases the chance of silent credential reuse and unintended disclosure to a third-party service.
The HTTP header hard-codes Accept-Language to prefer zh-CN, which imposes a specific language/locale behavior in the skill without any user opt-in or documented justification. The rest of the script also presents itself only in Chinese, reinforcing a locale constraint rather than offering a configurable choice.
This code file contains natural-language documentation and output strings exclusively in Chinese, starting with the module docstring. Under the language/locale policy, forcing a specific language without user opt-in is a policy concern unless the locale restriction is explicitly documented and justified.
The natural-language content of the skill file is entirely in Chinese, which effectively forces a specific language for users reading the documentation. The file does not indicate that this is an optional locale, provide an alternative language, or justify the restriction as region-specific policy.
This Python file contains its top-level module description entirely in Chinese, and later user-facing prints are also in Chinese. Under the policy, locale-specific behavior should offer user opt-in or be clearly justified as region-specific; this file does neither.
The test() function prints multiple status and result messages only in Chinese. This is a natural-language locale restriction in user-visible output, and the file does not provide a language choice or explain that the skill is intentionally limited to Chinese users.
The code hardcodes Accept-Language to prefer zh-CN and zh, which imposes a specific locale behavior without offering user opt-in or configuration. This is a natural-language/locale policy issue because the skill does not let users choose their preferred language or explain why Chinese is required.