Back to skill

Security audit

AI 生产力工具助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent local media-generation helper, but its executable client can be redirected away from the promised localhost endpoint and may send prompts or reference images through a configured external AI service.

Review before installing. Use it only with a trusted local DYU client, avoid submitting confidential prompts or private images unless you are comfortable with the configured external AI service processing them, and do not allow prompts or other skills to change the client's base_url away from localhost.

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 (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/local_client.py:44
Finding

Caller-Controlled Base URL Bypasses the Documented Loopback-Only Network Restriction

Content
View full analysis
None: self.base_url = base_url.rstrip("/") self.timeout = timeout self.session = requests.Session() self.session.headers.update({"Content-Type": "application/json"}) ``` ```python def get_client( base_url: str = LOCAL_BASE_URL, timeout: int = DEFAULT_TIMEOUT, ) -> DYULocalClient: """ 获取全局 DYULocalClient 单例。 无需任何凭证,直接使用即可。 示例: from local_client import get_client client = get_client() status = client.status() """ global _client if _client is None: _client = DYULocalClient(base_url, timeout) return _client ``` ### Technical Analysis The Skill documentation states that all requests are restricted to `http://127.0.0.1:17321`. However, both `DYULocalClient` and the public `get_client()` function accept an arbitrary `base_url` without validating its scheme, hostname, or port. The URL is subsequently used by `_url()`, `_get()`, and `_post()` for every request. Therefore, a caller can redirect client operations to an external or unintended internal HTTP service. The global singleton makes the issue more significant: the first endpoint supplied to `get_client()` is cached and silently reused by later calls in the same process. Generation operations call `check_client()` before submission, but this does not enforce the destination. A malicious server can return a forged `/api/status` response containing `running: true` and `ready: true`, after which the client submits the complete generation request to that server. Query operations do not call `check_client()` and can be redirected immediately. ### Attack Path 1. An attacker influences code that initialize ...[truncated 1896 chars]
Remediation
View remediation
None: self.base_url = LOCAL_BASE_URL ``` 2. If configurability is required, strictly validate the parsed endpoint: ```python from urllib.parse import urlparse def validate_base_url(base_url: str) -> str: parsed = urlparse(base_url) if ( parsed.scheme != "http" or parsed.hostname != "127.0.0.1" or parsed.port != 17321 or parsed.username is not None or parsed.password is not None or parsed.path not in ("", "/") or parsed.query or parsed.fragment ): raise ValueError("Only http://127.0.0.1:17321 is permitted") return "http://127.0.0.1:17321" ``` 3. Apply validation inside `DYULocalClient.__init__()` so direct construction cannot bypass restrictions. 4. Remove the global singleton or ensure that singleton identity includes the validated configuration. A caller-selected endpoint must not silently affect later users. 5. Add automated tests rejecting: - External hostnames and IP addresses. - Alternate loopback ports. - HTTPS or unsupported schemes. - User-information URL syntax. - Redirect-style or parser-confusion URLs. - Paths, queries, and fragments in the base URL. 6. Configure the HTTP session not to follow redirects, or validate every redirect target, so a permitted loopback endpoint cannot redirect requests to an external destination. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill performs network-capable actions against a local HTTP service (127.0.0.1:17321) but does not declare any explicit tool scope such as permissions or allowed-tools. Even though the target is localhost, this still exposes a privileged bridge from chat input to a local service that can submit jobs, query tasks, and potentially trigger downstream external actions through the local client, making capability boundaries unclear and unenforced.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document explicitly encourages supplying reference images via remote URL or Base64 but does not warn users that doing so may expose private images or embedded metadata to the local client and any downstream model/provider it uses. In this skill’s context, users are sending image-generation requests through chat-driven automation to a local service, which increases the chance that sensitive personal or business images are forwarded without informed consent or handling guidance.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The documentation explicitly states that the local client forwards generation requests to an external AI service, but it does not warn users that prompts and referenced image URLs may leave the local machine and be processed by a third party. In this skill’s context, users may assume 'localhost' means fully local processing, so the missing disclosure increases the risk of accidental sharing of sensitive text, business content, or private image references.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The top-level docstring is entirely in Chinese and presents the skill behavior only in that language. For a general-purpose client wrapper, this is a natural-language locale restriction without any opt-in, alternative language, or stated regional/compliance justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

模块级文档在 L004 表示无需任何 API Key,只需本地客户端运行即可;但 check_client 在 L090-L091 明确要求客户端“已配置网关(SK)”,否则拒绝执行生成任务。这不是简单的信息不完整,而是对使用前提的直接矛盾,容易误导调用方对凭证需求的理解。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

All user-facing natural language in the file is Chinese, with no indication that users may choose another language or that the skill is intentionally region-specific. Per the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

This markdown file describes returning result URLs and the configured gateway address, and later demonstrates printing them, but it does not include any warning about sharing or exposing those values. Because markdown files should warn about behaviors affecting privacy or system information, the omission is a minor disclosure gap.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.