T09 · Insecure Skill Coding Practices
- Location
smart_router.py:124- Finding
Full User Prompts Transmitted over Plaintext HTTP to a Hard-Coded LAN Host
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This model-routing skill is coherent in purpose, but it needs review because it automatically contacts a hard-coded private-network Ollama server over plaintext HTTP, can send full prompts there, and can rewrite model configuration without clear user consent.
Install only if you control and trust the Ollama service at 192.168.10.14 and are comfortable with prompts being sent to it over plaintext HTTP. Prefer changing the endpoint to localhost or a secured, explicitly configured server before use, and review the automatic model-detection behavior because it can rewrite the skill's model configuration during normal imports or routing.
smart_router.py:124Full User Prompts Transmitted over Plaintext HTTP to a Hard-Coded LAN Host
smart_router.py:35Module Import Triggers Unauthenticated Network Discovery and Persistent Configuration Changes
The README explicitly instructs users to configure a non-local Ollama host using an HTTP URL on a LAN IP address, but it does not warn that user prompts may be transmitted off-host to that service. Because the skill routes requests based on prompt content and may invoke a model for classification, sensitive user input could be sent over the network without informed user consent, creating privacy and data-handling risk even if the remote host is operator-controlled.
The skill explicitly states that complex requests will be handled by a cloud model/API, but it does not warn users that their prompts and potentially sensitive contents may be transmitted off-device. This creates a privacy and data-handling risk because users may unknowingly send proprietary code, credentials, file contents, or other sensitive material to a third-party service.
The skill describes automatic per-request model switching based on task complexity, while listing file operations and command-related tasks among routed behaviors, but it does not define safeguards preventing sensitive operational context from being sent to the cloud. Automatic routing increases the chance that users will not realize when task details, filenames, command text, or related context are transmitted to a remote model.
The file’s natural-language descriptions and user-facing CLI messages are entirely in Chinese, with no indication that language is selectable or limited to a region-specific deployment. This creates a locale policy concern because the skill effectively forces one language without user choice or justification.
The update_models path invokes model_manager.update_config_from_detection(), which appears to change model configuration state, but the code provides no confirmation prompt and no user-facing warning that this command may rewrite or alter configuration. The docstring only says it updates configuration, which is not a clear safety disclosure for a state-changing operation.
The remove_model function deletes a model entry via model_manager.remove_model(model_id) and the CLI executes it immediately after receiving an ID. Although success/failure is printed afterward, there is no prior warning, confirmation, or explanatory comment/documentation alerting the user that this is a destructive action.
This Python file contains natural-language descriptions and CLI output exclusively in Chinese, beginning with the module docstring and continuing throughout the command help and status messages. Because the file does not offer user opt-in for language selection or justify a Chinese-only locale restriction, it can violate language/locale policy requirements.
The module title, docstrings, and all user-facing messages are written exclusively in Chinese, which imposes a specific language on users without offering a choice. The stated purpose is generic model management rather than a clearly region-specific or compliance-bound workflow, so the locale constraint is not justified in the file.
The function claims to detect local Ollama models, but actually queries a fixed remote host at 192.168.10.14. This mismatch is security-relevant because operators may believe the code is only inspecting local state when it is actually performing network access to another machine, which can expose internal network details and trust remote-controlled data as if it were local.
The code invokes an external program to make a network request to a hard-coded private IP address, which creates an unexpected trust boundary and allows the skill to contact a remote service during model discovery. While there is no shell injection here because arguments are passed as a list, the subprocess plus hidden remote dependency can leak environment/network metadata, bypass expected local-only behavior, and make execution depend on an untrusted host.
try:
# 尝试获取Ollama模型列表
result = subprocess.run(
["curl", "-s", "http://192.168.10.14:11434/api/tags"],
capture_output=True,
text=True,
This manifest uses Chinese-only natural-language labels and descriptions for the configured models, such as task routing notes in parentheses and Chinese descriptions. Under the policy provided, forcing a specific language or locale without opt-in or documented justification is a natural-language policy violation.
Docstrings, status messages, prompts, and routing instructions are written exclusively in Chinese, which implies a fixed language/locale experience. The file does not indicate that users can opt into another language or that the locale restriction is documented and justified.
The code performs an external POST request containing raw user prompt content to a model endpoint. This is dangerous because prompt text can contain secrets, personal data, or proprietary content, and transmission over unsecured HTTP to a configurable host increases exposure to interception, unauthorized collection, or misuse by the receiving service.
if cache_key in self.cache:
return self.cache[cache_key]
response = requests.post(
f"{self.ollama_host}/api/generate",
json={
"model": self.judge_model,
The router sends the full user prompt to an HTTP network service for classification without any disclosure, consent flow, or minimization. Because prompts may contain sensitive user data and the default host is a private-network endpoint over plain HTTP, this creates a real privacy and data-exposure risk if the service is untrusted, intercepted, or logs requests.
The natural-language description and usage instructions are entirely in Chinese, and the file does not indicate that the skill is region-specific or provide an opt-in language choice. Under the stated policy, forcing a specific language without user choice is a locale-policy concern.
This code includes user-facing comments and error output in Chinese only, such as the error messages at L09 and L15. The file provides no language choice, opt-in, or justification for enforcing a Chinese locale, which conflicts with the policy against forcing a specific language without user choice.