T09 · Insecure Skill Coding Practices
- Location
run.py:4- Finding
Flask Debug Server Exposed on All Network Interfaces
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill appears to be a real intent-classification dashboard, but it exposes powerful management and debug functionality too broadly if run as documented.
Review before installing. Only run this bound to localhost or behind authentication, disable Flask debug mode, restrict access to the management APIs, sanitize dashboard rendering, limit or validate regex patterns, and pin reviewed dependencies before using it on any shared or network-reachable machine.
run.py:4Flask Debug Server Exposed on All Network Interfaces
intent_classifier/api.py:68Unauthenticated Intent Configuration Management
static/index.html:398Stored DOM Cross-Site Scripting in the Management Dashboard
intent_classifier/engine.py:94User-Controlled Regular Expressions Permit Denial of Service
The skill describes capabilities that imply local file read/write through JSON persistence, import/export, and generated data files, but it does not declare any explicit tool scope or permissions. This creates an authorization ambiguity where an agent or operator may enable broader filesystem access than users expect, increasing the risk of unintended file access or modification.
The activation phrases '识别意图 / 分类任务 / 智能路由' are broad, generic user intents that can easily appear in normal conversation. Overbroad triggers can cause the skill to activate unexpectedly and take over routing or classification flows, which is especially sensitive here because the skill influences downstream task selection and may expose management functionality.
The /api/categories response returns user-facing labels only in Chinese (代码类, 知识类, 任务类, 闲聊类). This imposes a specific language on all consumers of the skill without opt-in or indication that the skill is intentionally limited to a Chinese-speaking context.
This code persists intent data to a JSON file and is invoked from create, update, and delete flows, but there is no confirmation prompt, user-facing log, or explicit warning that local data will be modified. Because these operations affect stored user/system state, the lack of disclosure makes the side effects non-obvious to users.
The built-in intent names, descriptions, keywords, and regex patterns are predominantly Chinese, which biases routing toward a specific language/locale. In the absence of any visible opt-in, language choice, or justification in this file, this appears to impose a locale preference that may not match user expectations or organizational language policy.
The delete method removes an intent from memory and immediately saves the updated JSON file, making the operation persistent and potentially irreversible from the user's perspective. There is no confirmation step, warning, or user-visible notice around this destructive action.
The document declares lang="zh-CN", and the visible interface text throughout the page is Chinese, but there is no indication that users can opt into another language or that the tool is intentionally region-specific. This can violate organizational language/locale policy when a skill mandates a specific locale by default.
The docstring at L171 says this method will classify multiple texts at once, which implies one classification per item. However, the list comprehension calls self.classify(t) in both the condition and the true branch at L175-L176, causing duplicate classification work for each non-empty text.
This code file contains natural-language comments in Chinese (e.g. the weight label) without any indication that the skill is intentionally locale-specific or that users can choose their preferred language. The policy explicitly calls for flagging language or locale constraints when they are imposed without user opt-in or justification.
Several field comments describing categories and routing semantics are written only in Chinese, which introduces a language-specific assumption in the skill artifact. Because no opt-in, multilingual alternative, or documented regional justification appears in this file, this matches the natural-language policy violation category.
The comments for confidence and matched fields include Chinese-only natural-language descriptions, indicating the file assumes a specific language context. Under the policy, language-specific instructions or descriptions should not be forced without opt-in or clear justification.
The dependency is specified as flask>=3.0.0, which allows any future Flask release to be installed without review. This creates a supply-chain and reproducibility risk because builds may unexpectedly pick up vulnerable or breaking versions over time.
flask>=3.0.0
Because the manifest does not pin Flask to a specific version, it is impossible to verify whether the installed package is affected by known advisories. In practice, this means deployments may resolve to a vulnerable release or change over time, undermining assurance about the package's security state.
No suspicious patterns detected.