T09 · Insecure Skill Coding Practices
- Location
query_product_info.py:39- Finding
Hard-Coded API Key and Captured Client Identifiers
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it says, but it embeds fixed Vipshop client identifiers and saves/distributes more reviewer metadata than users would reasonably expect.
Install only if you are comfortable with direct Vipshop API calls using embedded shared identifiers and with review/product data being written into the working directory. Prefer a version that removes fixed user/fingerprint tokens, makes saving raw responses opt-in, minimizes reviewer fields, and documents retention and locale scope.
query_product_info.py:39Hard-Coded API Key and Captured Client Identifiers
query_review_list.py:84Excessive Persistence and Distribution of Review-User Metadata
The natural-language instructions, headings, and output expectations are all presented in Chinese, and the file does not indicate that the user can choose another language. Under the language/locale policy, forcing a specific language without user opt-in is a policy violation unless the locale constraint is explicitly justified.
The script persists the full raw API response to disk, which can include user-generated review text, usernames, location data, image URLs, and other metadata. Storing this data without explicit notice, minimization, or access controls creates a privacy and data-handling risk because sensitive content may remain on disk longer than intended and be exposed to other local users, logs, backups, or later processing.
The extracted review dataset is written to review_list.json and includes user content and metadata such as usernames, addresses, timestamps, tags, and image references. Even though this is processed output rather than the raw response, it still creates a local privacy exposure if users are not warned and if the data is retained insecurely.
The script embeds and transmits multiple hard-coded identifiers and tokens such as api_key, user_id, mars_cid, and tfs_fp_token in outbound requests. Even though the request uses HTTPS, storing and reusing these values in code can expose third-party credentials or tracking identifiers to anyone with code access, and can enable unauthorized API use, account linkage, or policy violations if the values are still valid.
The skill explicitly instructs the agent to fetch and analyze product review content through direct HTTP API calls, but it does not warn users that review text, images, and related product data will be collected and processed. This is primarily a transparency and informed-consent issue rather than an exploit primitive, but it can still create privacy, compliance, and trust risks if users are unaware of what data the skill retrieves and analyzes.
This JSON contains user-facing natural-language fields such as the product title and brand display name exclusively in Chinese. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy concern.
This manifest-style JSON contains user-facing natural-language fields such as product titles, price labels, and attributes entirely in Chinese, and there is no indication that the locale is user-selectable or intentionally region-scoped. Under the policy for all file types, fixed language content can be a locale-policy issue when no opt-in or justification is provided.
The module docstring and function docstring describe querying product information, which implies retrieving and returning data. However, the implementation additionally persists both the raw response and processed product information to local JSON files at L73-L76 and L125-L127. This is a behavioral side effect not reflected in the documentation, and the docs suggest a narrower intent than the code actually performs.
The request header hard-codes "Accept-Language: zh-CN,zh;q=0.9", which imposes a specific language/locale behavior. The file does not offer any user opt-in or configuration for locale, and no region-specific compliance justification is documented in the code comments or docstrings.
The Accept-Language header is hardcoded to zh-CN,zh;q=0.9, which imposes a specific language/locale behavior. The file does not provide any opt-in, configurability, or explanation that this is intentionally region-specific, so it fits the language/locale policy-violation category.
The script writes the full API response to a local JSON file without warning or consent. If the response contains account-linked metadata, behavioral identifiers, or product/review data subject to retention constraints, this can create unnecessary local data exposure and persistence beyond the user's expectations.
This JSON contains natural-language review content in Chinese, and the file provides no accompanying indication that the skill or dataset is limited to Chinese-language use by design. Under the policy, forcing a specific language without opt-in or justification can be a locale-policy issue.
This file contains natural-language user-facing content in Chinese, such as the review text at L011, but provides no indication that the language is user-selected or that the data is intentionally limited to a Chinese-language context. Under the policy rule for language or locale constraints, forcing a specific language without opt-in can be a policy concern.
This manifest-style JSON file contains user-facing text exclusively in Chinese, such as the default review summary and satisfaction strings, without indicating that the skill is region-specific or that other language/locale options are available. Under the language/locale policy rule, hard-coded user-facing locale content can be a policy concern when no opt-in or justification is present.
This JSON contains multiple user-facing strings entirely in Chinese, such as the default reputation text and keyword labels, with no indication that language selection is configurable or user-chosen. Under the natural-language policy rule, hard-coded locale-specific content can be a policy concern when the skill does not document an opt-in or justified regional scope.
No suspicious patterns detected.