Back to skill

Security audit

Openclaw Bot Prob Trade

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed Polymarket trading bot, but it needs Review because it can run persistent live trading while its safety controls and dependency pinning are weaker than advertised.

Install only after reviewing the live-trading path. Keep dry_run enabled first, use restricted trading API keys and small exchange-side limits, pin the probtrade dependency to a reviewed version or commit, and treat the built-in risk manager as incomplete rather than a hard safety boundary.

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
lib/risk_manager.py:43
Finding

Trading risk controls are incomplete, use stale state, and reset when the process restarts

Content
View full analysis
0 and total_exposure / state.balance > self.config.max_total_exposure: return False, f"Total exposure {total_exposure / state.balance:.1%} > {self.config.max_total_exposure:.1%}" if len(state.positions) >= self.config.max_open_positions: return False, f"Max open positions ({self.config.max_open_positions}) reached" ``` ```python # lib/risk_manager.py:109-145 def validate_signal(self, signal: Signal, state: TradingState) -> tuple: """ Validate a specific trade signal. Returns (allowed: bool, reason: str). """ if signal.amount > self.config.max_position_size: return False, f"Amount ${signal.amount:.2f} > max position ${self.config.max_position_size:.2f}" if self.daily_spent + signal.amount > self.config.max_daily_spend: return False, f"Would exceed daily limit: ${self.daily_spent:.2f} + ${signal.amount:.2f} > ${self.config.max_daily_spend:.2f}" if signal.amount > state.balance: return False, f"Amount ${signal.amount:.2f} > balance ${state.balance:.2f}" if signal.order_type == "LIMIT" and signal.price is None: return False, "LIMIT order requires price" if signal.price is not None and (signal.price < 0.01 or signal.price > ...[truncated 5131 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:31
Finding

Installation instructions execute and import unpinned third-party dependencies

Content
View full analysis
Remediation
View remediation
``` 3. Publish and verify SHA-256 checksums or signed release artifacts. Prefer signed tags and verify signatures before installation. 4. Record the expected dependency version or commit in this project and fail closed if the loaded dependency does not match it. 5. Install dependencies in an isolated virtual environment rather than inserting an arbitrary externally controlled path at the front of `sys.path`. 6. Import the dependency as a pinned package with explicit provenance rather than relying on a generic top-level module name such as `api_client`. 7. Restrict trading API credentials to the minimum required permissions, account, and spending limits. Use separate read-only credentials for scan and status operations where supported. 8. Run the bot as a dedicated unprivileged user with a read-only filesystem, no unnecessary capabilities, and outbound network access limited to explicitly required API hosts. 9. Include the referenced systemd and container definitions in the audited artifact so their least-privilege claims can be independently reviewed. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • 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
Findings (84)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description presents a broad autonomous trading bot for Polymarket that can run strategies, manage risk, and scan markets. The supplied code chunk is much narrower: it is only one strategy file for weather-market arbitrage. More importantly, its core advertised behavior—comparing official NOAA forecasts to market prices—is not actually implemented. The _get_forecast_probability method always returns None and contains only TODO comments, so in practice the strategy will not generate trades based on NOAA data. It does scan markets via prob.trade search, but the central arbitrage capability described in the module docstring is stubbed out. This makes the code’s actual behavior materially different from both the broad declared purpose and the specific implied weather-arbitrage functionality.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 57)May include surrounding context.

2. Set up environment

bash
cp .env.example .env

Edit .env:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 297)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 298)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 305)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 306)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 428)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 625)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 628)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · docs/deployment.md (reported line 629)May include surrounding context.

bash
cd /opt/openclaw-bot

# Create .env
cat > .env << 'EOF'
PROBTRADE_API_KEY=ptk_live_your_key
PROBTRADE_API_SECRET=pts_your_secret

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 · README.md (reported line 19)May include surrounding context.

Polymarket CLOB (order book)

text

You write a strategy as a simple Python class. The engine runs it on a schedule, checks risk limits, and executes orders through [prob.trade](https://app.prob.trade). All blockchain operations (wallet management, transaction signing, gas) are handled by prob.trade — your bot only makes HTTP calls.

## Quick Start

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

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 · README.md (reported line 188)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · README.md (reported line 189)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 265)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 272)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 273)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 280)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 323)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 324)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 325)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 326)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 333)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 345)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

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 · docs/deployment.md (reported line 353)May include surrounding context.

Systemd (VPS)

bash
sudo cp deploy/openclaw-bot.service /etc/systemd/system/
sudo systemctl enable --now openclaw-bot

Static analysis

No suspicious patterns detected.