Back to skill

Security audit

Clash Controller

Security checks for vulnerabilities and agentic risk

Overview

This skill is meant to control a local Clash proxy, but it embeds a controller secret and can change proxy routing from broad, ambiguous commands without confirmation.

Review this before installing. It is not evidence of malware, but it can alter local proxy routing and includes a built-in Clash controller secret. Install only if you understand the Clash REST controller setup, rotate or replace the secret, keep the controller bound to localhost, and use explicit commands because ambiguous phrasing can change routing unexpectedly.

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

T09 · Insecure Skill Coding Practices

Warning
Location
skill.js:3
Finding

Hard-Coded Clash REST API Bearer Secret

Content
View full analysis
{ const options = { hostname: '127.0.0.1', port: port, path: path, method: method, headers: { 'Authorization': `Bearer ${secret}`, 'Content-Type': 'application/json' } }; ``` ### Technical Analysis The Clash REST API bearer secret is embedded directly in the distributed source code. It is automatically attached to every API request made by the skill. A source-level credential cannot remain confidential because any user, process, archive recipient, repository reader, or package consumer with access to the project can recover it. The exposure is especially significant if this credential is also present in a live Clash configuration. The code currently connects only to `127.0.0.1`, which limits direct remote exploitation by this skill. Nevertheless, the exposed credential could be reused independently if the Clash external controller is accessible through another interface, port-forwarding arrangement, local malware, or a separate network configuration. ### Attack Path 1. An attacker obtains a copy of the project, package, repository, or source archive. 2. The attacker reads the bearer secret from `skill.js:3`. 3. The attacker identifies a running Clash controller configured with the same secret. 4. The attacker reaches that controller locally or through an exposed controller interface, tunnel, proxy, or port forward. 5. The attacker submits authenticated Clash API requests using the recovered bearer secret. 6. Within the permissions offered by the Clash API, the attacker reads proxy state or modifies proxy selection and related controller-man ...[truncated 726 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skill.js:49
Finding

Overly Broad Substring Matching Can Trigger Unintended Proxy Changes

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The skill metadata describes routine proxy control, but the finding indicates the underlying behavior accesses a sensitive local control interface with a hardcoded API secret and performs actions not clearly disclosed. Description-behavior mismatch is dangerous because users may authorize benign-sounding actions without understanding that the skill can reconfigure local network routing and query node information through privileged local APIs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger phrases include broad terms like '代理' and '状态', which can match ordinary conversation and unintentionally invoke a skill that changes proxy behavior. In this context, accidental activation is security-relevant because the skill affects local network configuration and could disrupt traffic routing or privacy expectations without a deliberate user request.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The example phrases for status and node switching are short and ambiguous, lacking constraints that ensure the user intends to invoke this specific proxy-control skill. Because the skill can alter routing behavior, ambiguous examples increase the chance of unintended invocation and unreviewed changes to a sensitive local networking component.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The skill performs authenticated state-changing requests against a local privileged service and includes a hardcoded bearer token, allowing anyone who can invoke the skill to alter proxy routing without an explicit warning or confirmation step. In this context, changing proxy behavior can silently redirect or disable network traffic paths for the user, making the action security-relevant rather than a harmless preference change.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The command handling and responses are primarily written in Chinese, including trigger terms and output messages, while also partially mixing English terms. There is no indication that the skill is intentionally limited to a Chinese-speaking context or that users can choose another language, which may violate a language/locale policy requiring opt-in or justification.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description says the skill controls Clash for Windows by '启动、关闭' (start/stop), and the user-facing strings also say '启动 Clash' and '停止 Clash'. In code, the '开启/启动' path only sends PUT /proxies/GLOBAL with name '自动选择', while the '关闭/停止' path switches GLOBAL to 'DIRECT'; this changes routing behavior but does not actually start or stop the Clash process.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The comments label the branches as '开启代理' and '关闭代理', and the usage text says '启动 Clash' and '停止 Clash'. However, those branches only write to /proxies/GLOBAL to select '自动选择' or 'DIRECT', so the documentation actively overstates what the code does.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill's natural-language interface, examples, and trigger phrases are presented only in Chinese, with no indication that the user may choose another language or locale. Under the stated policy, a fixed language without opt-in can be a locale-policy issue unless clearly documented as region-specific.

Content

No source excerpt is available for this finding.