T09 · Insecure Skill Coding Practices
- Location
scripts/credit_system.py:14- Finding
User-Controlled Path Traversal Enables Arbitrary JSON File Access and Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly performs local Chinese text analysis, but it bundles under-disclosed monetization and self-rewriting utilities that can alter installed skill code and store local usage data.
Install only if you are comfortable reviewing the bundled monetization scripts and local state files. Avoid running scripts/revenue_optimize.py unless you intentionally want it to rewrite an installed skill, and consider removing or fixing the credit/trial persistence code before using this in a shared or production environment. The advertised limited-time offer ended on 2026-03-31, so the pricing copy is stale as of 2026-09-12.
scripts/credit_system.py:14User-Controlled Path Traversal Enables Arbitrary JSON File Access and Overwrite
scripts/credit_system.py:35Credit Balance Can Be Forged Without Authorization or Payment Verification
scripts/revenue_optimize.py:54Revenue Optimization Utility Destructively Rewrites Installed Skill Code and Instructions
README.md:17Unpinned npx Installation Command Exposes Users to Mutable Supply-Chain Code
index.py:167Persistent User Identifiers and Usage Records Are Stored Without Permission Hardening
This script does not just analyze a skill; it rewrites the target skill to add pricing, premium features, enterprise features, and a persistent credit-tracking system under the user's home directory. Those behaviors materially expand the skill’s scope and data handling without user consent, making the script capable of silently monetizing or altering a deployed skill in ways unrelated to its apparent semantic-processing purpose.
The title and description state that the skill is specifically designed to make the system 'understand Chinese,' which implies a fixed language/locale orientation. Under the language/locale policy, this should either be presented as an explicit opt-in choice or clearly justified as a region-specific tool; neither is stated here.
The README instructs users to run npx clawhub install zh-semantic-enhancer without pinning a specific version, which can cause users to fetch and execute whatever package version is current at install time. In a supply-chain compromise or malicious update scenario, this increases the chance of unintended code execution on the user's system.
The README explicitly declares the skill language as "zh-CN" and describes it as making OpenClaw "truly understand Chinese," without offering any user language choice or stating that use is limited to users who intentionally selected a Chinese-only skill. This is a natural-language locale policy concern because it imposes a fixed locale rather than presenting it as an opt-in preference.
With no manifest available, the module docstrings and function names indicate a Chinese semantic understanding/enhancement skill. In addition to text analysis, the code reads billing-related API credentials from environment variables and later enforces a paid/trial usage model with per-user accounting, which is a separate monetization capability not justified by the stated analysis role in the code documentation.
The class and method documentation explicitly define the skill as processing Chinese text only, and the instance sets self.lang = 'zh'. There is no natural-language indication that users can choose another language or must opt in to this locale restriction, which is a language/locale policy concern.
The skill persistently stores per-user trial usage in ~/.openclaw/skill_trial without integrity protection, access control hardening, or disclosure. Even though the data is limited, it creates an unnecessary local tracking artifact tied to user identifiers and can expose privacy information or be tampered with by other local processes.
The skill writes trial usage data to a user-local file with no user-facing warning, consent, or retention explanation. Silent persistence of identifiers and usage counts is privacy-relevant and can surprise users or violate host expectations, especially in a text-processing skill where local tracking is not obvious.
The package description explicitly defines the skill as a Chinese semantic understanding enhancement capability, which indicates a language-specific constraint. In this manifest there is no accompanying note that the skill is optional, user-selected, or limited to a justified region-specific context.
The file description and storage path use Chinese-specific wording (for example, 'API积分系统' and 'zh_semantic_credits'), which suggests the skill is scoped to a specific language/locale. There is no natural-language indication that users can opt into this locale or choose an alternative.
The module title and docstrings prominently use Chinese-language labels such as "企业版功能" and "自定义词典 - 企业版" without any indication that users may choose another language or that the skill is region-specific. This can violate language/locale policy because the skill implicitly fixes its interaction language rather than making it optional or explicitly justified.
The module title and surrounding documentation explicitly frame the skill as focused on Chinese intent understanding, and later functions are hard-coded for Chinese normalization and cultural interpretation. This can violate language/locale policy when a skill implicitly forces a specific language behavior without offering user choice or clearly documenting a justified regional scope.
The file’s natural-language strings and documentation are predominantly in Chinese, including module descriptions, comments, and domain vocabularies, with no indication that users may choose another language or locale. This can violate language/locale policy when a skill effectively constrains usage to a specific language without opt-in.
This Python file contains natural-language strings and documentation exclusively in Chinese, including the module docstring and pricing tier names/features. Under the policy criteria, forcing a specific language without user opt-in or documented regional justification is a natural-language policy violation.
The file header and embedded descriptions frame the skill as a Chinese semantic enhancement system and all generated user-facing content is fixed to Chinese/bilingual output without offering a language choice. This can violate language or locale policy when the skill implicitly forces a specific language experience rather than letting the user opt in or select their preference.
The docstring and method name state that the function analyzes revenue potential, but the implementation fixes revenue_score to 30 and merely scans index.py for strings like 'subscription' and 'premium'. This is an intent mismatch because the code presents itself as substantive analysis while performing only superficial keyword checks.
The script writes new modules directly into the skill directory without warning, confirmation, or transactional safeguards. In an agent-skill context, silent modification of executable files is dangerous because it can alter runtime behavior, introduce unreviewed capabilities, and make supply-chain style changes that a user may never notice.
The generated credit system persists per-user usage and purchase history to a local file path in the home directory without any disclosure, consent flow, access control, or retention policy. Even if the stored fields are limited, undisclosed persistence of monetization and usage data creates privacy risk and can expose behavioral or financial metadata to other local processes or future components.
The module description states it is a Chinese expressions detection module, and the implementation only recognizes Chinese-specific idioms, slang, and proverbs. For the policy category, this is a natural-language locale constraint without any visible user opt-in or documented justification in the file.
This markdown file presents the skill as specifically built for Chinese semantics, but does not include any user-facing warning that the skill is language-specific and may not work correctly for other languages. Because markdown files should warn about behavior that can materially affect outputs, the lack of a clear limitation notice is a quality/safety gap.
The dependency uses a caret range, which allows newer compatible versions to be installed without review. This can introduce supply-chain risk if a future release is compromised, malicious, or incompatible, especially for a skill that processes untrusted user input through third-party NLP libraries.
"entry_point": "on_user_input"
},
"dependencies": {
"jieba": "^0.42.1",
"hanlp": "^2.1.0"
},
"scripts": {
The dependency uses a caret range, allowing automatic adoption of future 2.x releases. This increases exposure to supply-chain compromise or unexpected behavior in a library that may handle complex model loading and text processing paths.
},
"dependencies": {
"jieba": "^0.42.1",
"hanlp": "^2.1.0"
},
"scripts": {
"test": "python -m pytest tests/"
The _save method persists usage and purchase data to ~/.openclaw/zh_semantic_credits/{user_id}.json, which is a file write affecting user data. The code provides no confirmation prompt, logging, print statement, or explanatory comment/docstring warning that local account data will be stored on disk.
The module docstring and method/class docstrings include Chinese text such as '订阅管理器' and '获取活跃订阅' without any indication that the user can choose their preferred language or locale. This can violate a language/locale policy when a skill implicitly forces one language in user-facing text.
The module name and documentation explicitly define the skill as a Chinese tokenization module, and all user-facing strings in the test output are in Chinese. Per the policy, forcing a specific language can be a locale-policy issue when there is no opt-in or documented region-specific justification in the file.
No suspicious patterns detected.