Back to skill

Security audit

kuaidaili-proxy-ip-manager

Security checks for vulnerabilities and agentic risk

Overview

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.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/api_client.py:323
Finding

Proxy usernames and passwords are exposed through command output

Content
View full analysis
= 4: ip_list.append({ "host": parts[0], "port": parts[1], "username": parts[2], "password": parts[3], "full_address": f"http://{parts[2]}:{parts[3]}@{parts[0]}:{parts[1]}" }) ``` ```python if args.command == 'get': result = call_api(args.product) if result["success"]: print(f"[OK] 获取到 {len(result['data']['ip_list'])} 个代理IP") for ip in result['data']['ip_list'][:5]: print(f" {ip['full_address']}") else: print(f"[错误] {result['error']}") ``` ```python elif args.command == 'get_ip': result = get_proxy_ip(args.product, args.num) if result["success"]: ip_list = result["data"]["ip_list"] print(f"[OK] 获取到 {len(ip_list)} 个代理IP") for ip in ip_list: print(f" {ip.get('full_address', ip)}") else: print(f"[错误] {result['error']}") ``` ### Technical Analysis The API response parser creates `full_address` values containing the proxy username and password in URL user-information syntax. Both the `get` and `get_ip` command paths print these values without redaction. The output may be captured by shell history tooling, terminal recording, CI logs, Agent transcripts, monitoring systems, or shared chat output. This also conflicts with the Skill documentation's claim that logs and output automatically mask sensitive values. Although providing a usable proxy endpoint is part of the declared functionality, displaying reusable passwords by default is not the minimum disclosure necessary. A secure default can ...[truncated 1028 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/config_manager.py:271
Finding

Long-lived API credentials are accepted through process command-line arguments

Content
View full analysis
[args]") print("命令: set | show | check | refresh") sys.exit(1) cmd = sys.argv[1] if cmd == "set": if len(sys.argv) < 4: print("错误: 请提供 secret_id 和 secret_key") print("示例: config_manager.py set example_id123 example_key456") sys.exit(1) result = set_config(sys.argv[2], sys.argv[3]) ``` ### Technical Analysis The configuration interface requires the Secret ID and Secret Key to be supplied as command-line arguments. Command-line arguments can be visible to other local users through process inspection while the command is running. They may also be retained by shell history, endpoint monitoring, process accounting, audit frameworks, remote administration software, or command telemetry. The Secret Key is a long-lived credential capable of requesting new authentication tokens. Passing it through argv is therefore materially less secure than interactive secret input or use of an operating-system credential store. ### Attack Path 1. A user follows the documented configuration pattern and runs the script with the Secret Key in argv. 2. The shell records the command in its history, or a process/audit monitor records the process arguments. 3. Another local user, administrator, support operator, or compromised monitoring component accesses the retained command data. 4. The attacker extracts the Secret ID and Secret Key. 5. The attacker requests a fresh token from the documented authentication endpoint. 6. The token is used to access the victim's Kuaidaili resources. ### Impact Assessment Exposure of the Secret Key can allow repeated token generation and unauthorized use of the associated proxy service. The aff ...[truncated 263 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/api_client.py:75
Finding

Authentication tokens in query strings may be disclosed through raw network exception messages

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (21)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

代码与“仅支持快代理服务”的范围基本一致,也确实涉及订单信息获取和一定程度的使用统计(record_stat)。但声明中的若干核心能力在该代码块中并未体现:没有真正的IP健康检查,没有到期提醒机制,没有并发调度或并发设置管理,只是读取订单字段;此外命令行暴露的命令与声明触发命令不一致。虽然部分功能可能存在于其他文件,但基于所给代码块,描述明显夸大了已实现能力,因此应判定为描述与行为不完全一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

该代码确实与快代理服务相关,并实现了“API 配置”这一部分,还会访问快代理认证域名获取 secret_token,因此“仅支持快代理服务”的方向基本一致。但从实际功能看,这只是一个配置/认证管理模块,而非完整的“智能管理技能”。声明中列出的核心能力——订单信息、到期提醒、IP 健康检测、并发调度、使用统计——在该代码片段中均未体现。与此同时,实际命令行接口与声明的可触发命令也存在明显不一致。因此描述明显夸大了当前代码的能力,属于描述与行为不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

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.

Content

Scanner excerpt · scripts/config_manager.py (reported line 131)May include surrounding context.

python
return secret[:4] + "***" + secret[-4:]


def set_config(secret_id, secret_key, test_url=None, timeout=None):
    """
    设置配置

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
65% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

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.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

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.

Content

No source excerpt is available for this finding.