T09 · Insecure Skill Coding Practices
- Location
scripts/lafeitu_client.py:74- Finding
Passwords Exposed Through Command-Line Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent Lafeitu shopping skill, but it handles account credentials and order/profile actions with security weaknesses users should review before installing.
Install only if you are comfortable with an agent managing a Lafeitu account, cart, profile data, and order creation. Avoid entering real passwords in command-line arguments or examples because they may appear in shell history, process lists, or logs; prefer the website flow or a safer secret-input mechanism, and use logout/delete credentials when finished.
scripts/lafeitu_client.py:74Passwords Exposed Through Command-Line Arguments
scripts/lib/commerce_client.py:73Custom Authentication Headers May Leak Across Cross-Origin Redirects
The README advertises account flows, cart management, and order creation, which implies session or credential persistence for continued authenticated use. In a commerce skill, persistent authenticated context increases exposure if local credential storage, token reuse, or session handling is insufficiently controlled, especially because the skill can perform account-linked and purchase-preparation actions.
# Lafeitu Gourmet Skill
A brand-specific commerce skill for Lafeitu (辣匪兔). This project gives agents a structured way to browse products, manage carts, handle account flows, and create orders against the official `https://lafeitu.cn/api/v1` backend, while leaving final payment to the user.
Official Website: https://lafeitu.cn
clawhub: https://clawhub.com/NowLoadY/agentic-spicy-food
The README describes account-bound and state-changing actions such as login, registration, profile updates, cart modification, and order creation without clearly warning that these operations can alter user account data or create purchase-ready orders. In an agentic commerce context, missing user-consent and side-effect warnings increase the risk of unintended or unauthorized actions being triggered by an assistant.
The skill invokes python scripts, accesses a credentials path under the user's home directory, and calls a remote API, but it declares no explicit tool or permission scope. That creates an overbroad execution surface where an agent may use shell, filesystem, and network capabilities without clear restriction or user visibility, increasing the chance of unintended sensitive data access or unsafe command execution.
The skill is designed for authenticated commerce workflows including cart management, profile updates, order history, and order creation, which inherently rely on persistent session state. In this context, session persistence increases risk because stale or silently reused authentication could let later prompts or users act on a prior user's account, especially in multi-user or long-lived agent environments.
- inspect variants, pricing, promotions, or shipping thresholds
- manage a Lafeitu cart
- log in, register, or update Lafeitu profile data
- create a Lafeitu order and hand payment back to the user
- retrieve official Lafeitu brand, company, or contact information
## Tool Priority & Fallback Strategy
The skill states that credentials are stored locally under a fixed path, but it does not warn the user, describe protection measures, or limit retention. Because the skill also handles login, registration, profile, and order flows, this local token storage could expose authentication material to other local processes, users, or overly capable agents if the directory permissions are weak or the environment is shared.
The file contains multiple user-facing descriptions and outputs exclusively in Chinese, including comments describing the tool, CLI help text, and runtime messages such as cart and product displays. There is no indication that the user can choose a language or that the Chinese-only behavior is a documented, justified locale restriction, which creates a natural-language locale policy concern.
The manifest describes a brand-specific skill for Lafeitu's official API, but the class is documented and implemented as a universal commerce client with per-domain credential storage and multi-merchant isolation. That broader behavior meaningfully exceeds the stated single-brand scope rather than being a necessary implementation detail of a Lafeitu-only skill.
The get_api_token method posts account and password to obtain a token, but there is no visible warning, confirmation, or explanatory disclosure in the code about sending credentials over the network. This is a safety-critical operation involving sensitive authentication data.
The manifest says the skill is for browsing, recommending, carting, ordering, and handling account/profile/promotion/brand information. This file additionally implements sending verification codes and registering new accounts, which are distinct account-creation capabilities not clearly covered by the stated description.
The register method transmits email, password, name, verification code, invite code, and visitor ID to a remote endpoint. Although this behavior may be functionally necessary, the code provides no visible user disclosure, confirmation, or warning that sensitive identity and credential data will be sent and stored.
The update_profile method sends arbitrary profile data over the network, which may include personal information, but there is no confirmation prompt, logging, or explanatory comment/docstring warning that user data will be transmitted. For this file-level review, the operation is safety-relevant because it affects user privacy and lacks visible disclosure in the code.
The module docstring explicitly states the formatters are 'Chinese-localized' with 'Mandarin display labels' and defaults to Chinese currency conventions. This creates a language/locale constraint in natural-language behavior without any visible user opt-in or alternative locale handling in the file.
No actionable SQP-3 finding was identified. The file includes bilingual content rather than imposing a single language without opt-in.
No suspicious patterns detected.