T09 · Insecure Skill Coding Practices
- Location
scripts/config_manager.py:52- Finding
API credentials are persisted in plaintext without enforced owner-only permissions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill fits its stated Kuaidaili proxy-management purpose, but it handles live API and proxy credentials in ways that need careful review before installation.
Install only if you are comfortable with a local skill storing Kuaidaili API secrets in plaintext and potentially printing usable proxy credentials. Prefer a private environment, rotate credentials after testing, avoid pasting real secrets into shell commands or shared chats, restrict permissions on the config file, and review logs/transcripts for accidental credential exposure.
scripts/config_manager.py:52API credentials are persisted in plaintext without enforced owner-only permissions
scripts/api_client.py:323Proxy usernames and passwords are exposed through command output
scripts/config_manager.py:271Long-lived API credentials are accepted through process command-line arguments
scripts/api_client.py:75Authentication tokens in query strings may be disclosed through raw network exception messages
代码与“仅支持快代理服务”的范围基本一致,也确实涉及订单信息获取和一定程度的使用统计(record_stat)。但声明中的若干核心能力在该代码块中并未体现:没有真正的IP健康检查,没有到期提醒机制,没有并发调度或并发设置管理,只是读取订单字段;此外命令行暴露的命令与声明触发命令不一致。虽然部分功能可能存在于其他文件,但基于所给代码块,描述明显夸大了已实现能力,因此应判定为描述与行为不完全一致。
该代码确实与快代理服务相关,并实现了“API 配置”这一部分,还会访问快代理认证域名获取 secret_token,因此“仅支持快代理服务”的方向基本一致。但从实际功能看,这只是一个配置/认证管理模块,而非完整的“智能管理技能”。声明中列出的核心能力——订单信息、到期提醒、IP 健康检测、并发调度、使用统计——在该代码片段中均未体现。与此同时,实际命令行接口与声明的可触发命令也存在明显不一致。因此描述明显夸大了当前代码的能力,属于描述与行为不匹配。
The skill documentation describes capabilities that require filesystem access, local secret storage, and outbound network calls, but it does not declare any explicit tool scope such as allowed-tools or permissions. That creates an overbroad and opaque execution model where an agent may invoke sensitive capabilities without clear user or platform constraints, increasing the chance of unintended secret exposure or excessive network/file access.
The manifest description and user-facing documentation are entirely in Chinese and present the skill as operating in that language, with no indication that users can choose another language or locale. Under the policy rule, a skill that effectively imposes a specific language without opt-in should be flagged.
The document includes examples sending secret_id and secret_key directly in a form-encoded request body without any warning about handling, redaction, or storage of these credentials. In a skill that manages proxy infrastructure and order data, this increases the chance that implementers copy the pattern into tooling that logs request bodies, exposes secrets in debug output, or mishandles long-lived credentials.
The examples place the signature secret token in GET query strings, which are commonly captured by browser history, proxy logs, server access logs, monitoring systems, and referrer leakage. Because the token is used to authenticate subsequent API calls, exposing it can allow unauthorized access to proxy/IP management functions until expiration, making this more dangerous in the context of an infrastructure-management skill.
get_secret_token sends secret_id and secret_key over the network via requests.post to an external host. The docstring documents the endpoint and parameters, but it does not clearly warn users that sensitive credentials are being transmitted to a third-party service, which is a safety-relevant disclosure for direct library use.
set_config accepts a user-supplied timeout and stores it without validation; because the assignment is guarded by 'if timeout', non-numeric or extreme values can later be used in network calls, potentially causing excessively long waits, hangs, or unstable behavior. In a skill that performs remote HTTP requests, unvalidated timeout parameters can degrade availability and make the agent easier to stall.
return secret[:4] + "***" + secret[-4:]
def set_config(secret_id, secret_key, test_url=None, timeout=None):
"""
设置配置
The code persists secret_id, secret_key, and secret_token in plaintext JSON under the user's home directory. If local filesystem permissions are weak, the host is shared, backups are exposed, or malware gains user-level access, these credentials can be recovered and used to impersonate the user against the proxy provider.
This code performs a network request to a configurable test URL via third-party proxies, which transmits system/network metadata to both the destination and the proxy. Although the script prints progress messages, it does not disclose this privacy-relevant behavior in a warning, confirmation, or descriptive comment near the operation.
This Python file contains natural-language documentation and user-facing strings exclusively in Chinese, including errors and status messages. The skill does not offer any language selection or indicate that it is intentionally limited to a Chinese-language audience, which conflicts with the policy against forcing a specific language without user opt-in.
The code extracts full proxy credentials from the API response, stores them in the returned structure, and constructs a directly usable proxy URI containing the password. Even though the display path masks the password later, the raw return value and generated URI increase the chance of accidental exposure through logs, exceptions, downstream consumers, or serialization, which would leak live proxy access credentials.
This Python file contains natural-language strings entirely in Chinese, including the top-level module description and user-facing command-line text, with no option for users to select another language. The policy requires flagging language or locale constraints when a skill forces a specific language without user opt-in or justification.
A file-wide natural-language policy issue exists because the skill documentation forces a single language presentation without offering user opt-in or documenting a justified locale restriction. Under the stated policy, language constraints should either be optional for the user or clearly justified as region-specific.
This code’s natural-language interface is written entirely in Chinese, including the module description and user-facing messages, with no indication that users can select another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.
The argparse description, help strings, and printed status/error messages are all presented only in Chinese. Because the file does not offer a language choice or document a justified locale restriction, this conflicts with the language/locale policy.
The module description, docstrings, and user-facing messages are entirely in Chinese, with no indication that another language can be selected. This can violate language/locale policy when a skill imposes a single language without user opt-in or documented regional justification.
This code file contains natural-language strings entirely in Chinese in the module docstring and throughout user-facing output, but it does not provide any user opt-in or alternative locale handling. Under the policy for natural-language constraints, forcing a specific language without choice is a language/locale policy issue.
The file’s natural-language documentation and generated user-facing messages are entirely in Chinese, including the notification text and error strings. Under the policy, forcing a specific language without opt-in can be a locale-policy violation unless the constraint is explicitly justified, which is not stated here.
The module docstring, CLI description, help text, and runtime messages are all Chinese-only, which imposes a language choice on users. There is no opt-in, fallback, or documentation indicating that this is intentionally limited to a Chinese-speaking environment.
The module docstring and all user-facing output strings are written in Chinese, and the file provides no indication that language is configurable or selected by user preference. This can violate language/locale policy when a skill implicitly forces a specific language without opt-in.