Back to skill

Security audit

MeshLink 服务发布

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent service-publishing purpose, but it asks agents to run MeshLink shell commands with insufficient input validation and an unpinned external CLI dependency.

Install only with a trusted, pinned MeshLink CLI version. Before using it, ensure the agent validates ports as integers from 1 to 65535, validates service names against lowercase kebab-case, and invokes meshlink with structured arguments rather than interpolated shell strings. Expect the skill to publish and remove local service entries through MeshLink after user confirmation.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:51
Finding

Shell command injection through unvalidated port and service-name arguments

Content
View full analysis
``` ```bash meshlink publish --name --port ``` ```bash meshlink unpublish --name ``` ### Technical Analysis The Skill directs the agent to insert port numbers and service names into Bash command templates. It does not require strict validation of the user-provided port or the name accepted by the unpublish workflow. Publication names generated during the normal publishing flow are restricted to lowercase kebab-case. However, this restriction is not explicitly applied to the independently invoked unpublish command. Port input also lacks a required numeric type check and range check. If these templates are executed through a shell after direct string substitution, shell metacharacters in an attacker-controlled value can terminate or extend the intended command. For example, a port value such as `3000; id > /tmp/meshlink-proof` could cause the shell to run both the intended `meshlink` command and the injected command. The vulnerability depends on the agent or command-execution layer constructing a shell command from the template rather than passing arguments as a structured argument array. The Skill does not mandate the safer execution method. ### Attack Path 1. An attacker asks the agent to publish a service and supplies a crafted port value containing a valid-looking port followed by a shell separator and an operating-system command. 2. The Skill directs the agent to insert that value into `meshlink check-port --port `. 3. If the agent executes the resulting text through Bash, the shell interprets the separator. 4. The injected command executes with the same operating-system privileges as the agent. 5. Alternatively, the attacker re ...[truncated 693 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding

Unpinned externally installed MeshLink CLI dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The instructions require service names to be converted into English-only kebab-case and the examples transliterate Chinese project names into English equivalents. This imposes a language choice on users without opt-in, which matches the language/locale policy violation category.

Content

No source excerpt is available for this finding.