Back to skill

Security audit

Polymarket CLI Trading

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent for Polymarket trading, but it documents an unsafe pipe-to-shell installer and weak private-key handling guidance in a real-money wallet context.

Use the Homebrew or reviewed source-build installation path instead of the `curl | sh` command. Do not pass wallet private keys on the command line, avoid exposing them in environment variables or logs, use a dedicated low-balance trading wallet, review approvals carefully, and require explicit confirmation before any trade, approval, cancellation, redemption, wallet reset, or API-key mutation.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:33
Finding

Unpinned Remote Installation Script Executed Directly by Shell

Content
View full analysis
Remediation
View remediation
/install.sh" echo " install.sh" | sha256sum -c - less install.sh sh install.sh ``` ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
README.md:33
Finding

Unpinned Remote Installation Script Repeated in User Documentation

Content
View full analysis
Remediation
View remediation
/install.sh" echo " install.sh" | sha256sum -c - less install.sh sh install.sh ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:55
Finding

Wallet Private Key May Be Supplied Through Exposed Process Arguments

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Chaining Abuse

High
Category
Tool Misuse
Confidence
99% confidence
Finding

The pipe into 'sh' is the dangerous execution step because it turns untrusted remote content directly into shell commands. In a trading skill context, this is especially sensitive because users may run it on machines holding wallets, API tokens, or financial credentials, increasing the blast radius of any compromise.

Content

Scanner excerpt · README.md (reported line 33)May include surrounding context.

Shell script:

bash
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh

Build from source:

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The | sh pipeline is especially dangerous because it chains untrusted network content directly into a shell interpreter, eliminating any inspection barrier and making malicious modifications instantly executable. In a trading skill that may later manage wallets, approvals, and API keys, compromise of the host could lead to theft of private keys, unauthorized trades, or broader system compromise.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

Shell script

bash
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh

Build from source (Rust)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 49)May include surrounding context.

polymarket setup

Or manually:

polymarket wallet create polymarket approve set # needs MATIC for gas on Polygon

text

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · README.md (reported line 15)May include surrounding context.

md
- Speed: Place and cancel orders faster than the web UI
- Automation: Script market-making and hedging strategies
- Transparency: See exactly what commands run before execution
- Control: Manage everything from your terminal
- Data: JSON output for programmatic analysis

**What makes this different:**

External Script Fetching

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The README instructs users to fetch and immediately execute a remote install script via curl, which creates a supply-chain and remote code execution risk. If the upstream repository, network path, or referenced script is compromised, users may run arbitrary shell commands on their system without reviewing them first.

Content

Scanner excerpt · README.md (reported line 33)May include surrounding context.

Shell script:

bash
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh

Build from source:

External Script Fetching

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The skill instructs users to fetch and execute a remote install script directly with curl ... | sh, which grants immediate code execution to whatever content is served at that URL at execution time. If the upstream repository, network path, or hosting account is compromised, users could run arbitrary attacker-controlled code on their machine without review.

Content

Scanner excerpt · SKILL.md (reported line 33)May include surrounding context.

Shell script

bash
curl -sSL https://raw.githubusercontent.com/Polymarket/polymarket-cli/main/install.sh | sh

Build from source (Rust)

Static analysis

No suspicious patterns detected.