Back to skill

Security audit

x-cmd

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent x-cmd helper, but it includes an agent-usable remote installer path that can execute mutable downloaded shell code before independent verification.

Review before installing. Prefer `brew install x-cmd` or a manual download-and-review flow, avoid the `curl | sh` auto-install path on machines with secrets, and do not let an agent install x-cmd or packages unless you explicitly requested that action and trust the package sources.

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

Unverified Remote Installer Piped Directly into a Shell

Content
View full analysis
Remediation
View remediation
/install.sh printf '%s %s\n' '' '/tmp/x-cmd-install.sh' | sha256sum -c - less /tmp/x-cmd-install.sh sh /tmp/x-cmd-install.sh ``` The URL and digest must refer to a real pinned release, and the digest must be obtained through a trusted channel independent of the downloaded artifact. ]]>
Vulnerability Patterns
  • 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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The skill includes a direct 'curl | sh' installation command that fetches and immediately executes remote code. Even though the document warns about the risk, embedding this pattern in an agent skill is dangerous because compromised infrastructure, DNS/TLS interception, or supply-chain abuse could lead to arbitrary code execution in the user's environment.

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

This fetches an external install script to a temporary file for later review and execution. It is safer than piping directly to a shell, but it still introduces supply-chain risk and may normalize execution of untrusted downloaded code, especially if an agent later automates the review step inadequately.

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
98% confidence
Finding

The '| sh' construct is a classic dangerous chaining pattern because it turns network-delivered content directly into shell execution without an inspection boundary. In an agent skill, this is especially risky because users may authorize the skill broadly and the command can execute arbitrary attacker-controlled code if the remote endpoint is compromised.

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"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly tells users to source ~/.x-cmd.root/X, which executes local shell code and alters the current shell environment, including PATH. Sourcing a script is more dangerous than invoking a standalone command because any code in that file runs with the user's privileges in the current shell session, and the documentation does not clearly warn about the trust boundary or the environment modifications being made.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill advertises x env use <pkg> and x pixi use <pkg> as instant installation mechanisms without clearly warning that these commands fetch and install external software onto the user's machine. This creates supply-chain and execution risk, especially for AI agents or users who may treat package names as harmless suggestions and install unreviewed software into a PATH-accessible location.

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 · SKILL.md (reported line 102)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

---

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

---

Static analysis

No suspicious patterns detected.