Back to skill

Security audit

Mirror Source Manager

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a disclosed mirror-management helper, but its install guide includes a high-impact remote installer path that can execute mutable code directly in the user's shell.

Review this before installing. Prefer the Homebrew installation path or manually download and inspect the installer in a low-risk environment. Avoid the direct curl | sh option on machines with credentials, production access, or sensitive source code, and confirm any mirror-changing action before allowing an agent to run it.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
data/install.md:104
Finding

Unpinned Remote Installation Script Executed Directly by a Shell

Content
View full analysis

Vulnerability Details

File Location: data/install.md, lines 25 and 104
Vulnerability Type: Remote payload retrieval and execution
Risk Level: High

The unsafe command is declared in the installation metadata at line 25 and presented as an executable installation option at line 104.

Complete vulnerable code snippet (line 25):

yaml
- name: install-script-auto
  command: "curl -fsSL https://get.x-cmd.com | sh"
  verification: checksum
  risk_level: high
  recommendation: "avoid in sensitive environments"
  requires_review: false
  warning: "Executes remote code without manual review"

Complete vulnerable installation command (line 104):

bash
curl -fsSL https://get.x-cmd.com | sh

Technical Analysis

The command downloads mutable content from https://get.x-cmd.com and immediately passes it to sh. The downloaded installer is not version-pinned, inspected, or cryptographically authenticated before execution. Consequently, the effective code can change after this Skill has been reviewed.

HTTPS protects the connection in transit but does not establish that the returned script is a specific, audited release. Compromise of the hosting endpoint, deployment pipeline, domain, TLS credentials, or another trusted infrastructure component could cause arbitrary attacker-controlled shell commands to be returned and executed.

The document explicitly warns that this option is high risk and recommends Homebrew or manual review. These warnings reduce the likelihood of accidental use but do not remove the execution vulnerability. The stated verification of downloaded binaries also occurs after the initial remote script has already started executing and therefore cannot protect against malicious commands embedded in that initial script.

The declared purpose of the Skill is to manage package-manager mirror configuration. Executing an unrestricted external installer is not the minimum priv ...[truncated 1747 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the curl -fsSL https://get.x-cmd.com | sh auto-install option from both the metadata and user-facing instructions.
  2. Prefer a trusted package-manager installation using a version-pinned release where the package manager verifies package integrity and provenance.
  3. If a standalone installer must remain available:
    • Download it to a uniquely created local file rather than piping it to a shell.
    • Pin the installer to an immutable release version and URL.
    • Publish a SHA-256 digest or, preferably, a cryptographic signature through an independently authenticated channel.
    • Verify the digest or signature before executing the installer.
    • Abort installation on any verification failure.
    • Allow the user to inspect the verified script before execution.
  4. Require explicit user consent before downloading or executing installation code. Agents should not automatically select an installation method.
  5. Run the installer as an unprivileged user in a restricted environment with no sensitive credentials. Do not request sudo unless a separately reviewed operation strictly requires it.
  6. Document all files, network destinations, and shell-profile changes performed by the installer.
  7. Treat the current manual-review workflow as an improvement over direct piping, but add cryptographic verification before execution; visual review alone is not a reliable integrity mechanism.

A safer pattern is:

bash
umask 077
installer="$(mktemp)"
curl -fL "https://example.invalid/releases/x-cmd-VERSION/install.sh" -o "$installer"
printf '%s  %s\n' 'PINNED_SHA256_VALUE' "$installer" | sha256sum -c -
less "$installer"
sh "$installer"
rm -f "$installer"

The release URL and digest must be replaced with immutable, publisher-authenticated values.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The file explicitly includes an auto-install command that pipes a remotely fetched script directly into the shell. Even though the document warns about the risk, this pattern enables immediate execution of unreviewed remote code and would allow full user-level compromise if the hosting domain, transport, or supply chain were compromised.

Content

Scanner excerpt · data/install.md (reported line 25)May include surrounding context.

md
recommendation: "acceptable with review"
      requires_review: true
    - name: install-script-auto
      command: "curl -fsSL https://get.x-cmd.com | sh"
      verification: checksum
      risk_level: high
      recommendation: "avoid in sensitive environments"

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · data/install.md (reported line 81)May include surrounding context.

bash
# 1. Download install script
curl -fsSL https://get.x-cmd.com > /tmp/x-cmd-install.sh

# 2. REVIEW the script content (critical step)
cat /tmp/x-cmd-install.sh

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

The | sh chaining pattern is dangerous because it converts network input directly into command execution with no inspection boundary. In this skill context, that is especially sensitive because the content is an installation guide an agent may follow automatically, increasing the chance that remote code execution occurs in user environments without adequate review.

Content

Scanner excerpt · data/install.md (reported line 104)May include surrounding context.

⚠️ WARNING: This executes remote code without manual review.

bash
curl -fsSL https://get.x-cmd.com | sh

Only use when:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · data/install.md (reported line 181)May include surrounding context.

x-cmd is entirely contained in ~/.x-cmd.root/. To remove:

bash
rm -rf ~/.x-cmd.root/
# Also remove from shell config (~/.bashrc, ~/.zshrc):
# [ ! -f "$HOME/.x-cmd.root/X" ] || . "$HOME/.x-cmd.root/X"

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · data/install.md (reported line 181)May include surrounding context.

x-cmd is entirely contained in ~/.x-cmd.root/. To remove:

bash
rm -rf ~/.x-cmd.root/
# Also remove from shell config (~/.bashrc, ~/.zshrc):
# [ ! -f "$HOME/.x-cmd.root/X" ] || . "$HOME/.x-cmd.root/X"

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill description and trigger examples are very broad, covering many generic package-manager and download-speed queries. This can cause unintended invocation in contexts where the user only wants advice or a single command, increasing the chance the agent applies a system-changing skill that rewrites package manager registries or mirrors without the user's explicit intent.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · data/install.md (reported line 95)May include surrounding context.

md
1. Creates `~/.x-cmd.root/` directory (user-local)
2. Downloads x-cmd core files from GitHub releases
3. Verifies SHA256 checksums of all downloaded files
4. No system modifications, no sudo required

---