Back to skill

Security audit

Polymarket Analysis

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Polymarket analysis tool, but its monitoring setup can create persistent agent cron jobs with ongoing alerts and local state without enough scoping or consent controls.

Install only if you want recurring Polymarket monitoring. Before enabling monitor mode, confirm the exact market, duration, state-file location, and alert recipient; avoid channel last, set an expiration, and remove the cron job when finished. Treat wallet profile lookups as sensitive even when the underlying data is public.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T06 · System Persistence

Warning
Location
references/market-monitoring-setup.md:25
Finding

Persistent Scheduled Agent Execution Without Explicit Consent or Automatic Expiration

Content
View full analysis

Vulnerability Details

File Location: references/market-monitoring-setup.md, lines 25-61
Vulnerability Type: Persistent scheduled task
Risk Level: Medium

Vulnerable Code

markdown
## Step 2: Create Monitoring Cron Job

Use clawdbot's cron tool to create isolated job:

```json
{
  "action": "add",
  "job": {
    "name": "Polymarket Monitor: [Market Name]",
    "schedule": {
      "kind": "every",
      "everyMs": 300000
    },
    "sessionTarget": "isolated",
    "payload": {
      "kind": "agentTurn",
      "message": "Monitor Polymarket market [URL]. Check for: 1) Price changes >5%, 2) Trades >$5000, 3) Pair cost <$0.98. Compare to previous state in .claude/skills/polymarket-analysis/state/[market-id].json. Alert if thresholds exceeded.",
      "timeoutSeconds": 120,
      "deliver": true,
      "channel": "last"
    },
    "enabled": true
  }
}

CLI Alternative

bash
clawdbot cron add \
  --name "Polymarket: BTC $200k" \
  --every "5m" \
  --session isolated \
  --message "Monitor polymarket.com/event/... for price/whale alerts" \
  --deliver \
  --channel last
text

### Technical Analysis

The monitoring instructions create an enabled scheduled job that launches an agent turn every five minutes and continues operating across sessions until it is manually disabled or removed. The job performs recurring network requests, reads and updates persistent market state, and delivers output through the last-used communication channel.

Persistent monitoring is consistent with the Skill's declared “24/7 market monitoring” mode, so the scheduled task is not hidden and is not evidence of a covert backdoor. However, the setup procedure does not require explicit user confirmation immediately before creating the job, establish an expiration time, limit the number of executions, or bind delivery to a specifically confirmed recipient. Consequently,
...[truncated 2570 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require explicit, informed confirmation immediately before creating any scheduled job. Present the interval, duration, monitored market, expected network requests, and delivery destination.
  2. Default to one-time analysis. Create persistent monitoring only when the user expressly requests recurring execution.
  3. Require an expiration time or maximum run count. For example, automatically remove the job when the market resolves or after a user-selected duration.
  4. Avoid "channel": "last". Require the user to select and confirm an explicit channel and recipient.
  5. Create jobs disabled by default, then enable them only after displaying the final configuration and receiving confirmation.
  6. Use a restrictive monitoring payload that invokes only the audited read-only script and fixed Polymarket API hosts rather than an open-ended agent instruction.
  7. Record the job identifier and provide it to the user together with exact pause and removal commands.
  8. Prevent duplicate monitors for the same market and owner to avoid unbounded recurring resource consumption.
  9. Stop monitoring automatically when the market closes or resolves.
  10. Clearly document that scheduled monitoring survives the current conversation and continues to consume resources until expiration or removal.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (16)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

A second description-behavior mismatch is present: the skill claims sentiment, profile tracking, and momentum analysis, but the observed implementation appears limited to threshold-based monitoring for a single market. Overstated analytical claims in a trading-related skill increase risk because users may rely on incomplete or misleading outputs, and hidden scope gaps make security and privacy review less reliable.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

A second description-behavior mismatch is present: the skill claims sentiment, profile tracking, and momentum analysis, but the observed implementation appears limited to threshold-based monitoring for a single market. Overstated analytical claims in a trading-related skill increase risk because users may rely on incomplete or misleading outputs, and hidden scope gaps make security and privacy review less reliable.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill advertises scripts and API usage that imply network access and operational behavior, but it does not declare an explicit tool/permission scope. That weakens containment and review because consumers cannot tell what capabilities the skill expects, and undeclared file/network access can be abused or accidentally over-granted by a host environment.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The document expands an analysis-only skill into a persistent monitoring system with scheduled execution, local state storage, and outbound alerts. That materially increases the operational scope and risk surface because it enables unattended background activity and retention of market/user-related state beyond a single interactive analysis session.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Providing instructions to create and manage clawdbot cron jobs introduces durable autonomous behavior that is not justified by the stated purpose of market analysis. Even without trade execution, scheduled jobs can repeatedly access resources, accumulate state, and continue acting after the user’s immediate session has ended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup directs creation of persistent cron jobs and state files without clearly warning the user that monitoring will continue autonomously and that local data will be stored. This is dangerous because users may unknowingly authorize ongoing background actions and retention of market-tracking state, undermining informed consent and operational transparency.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
83% confidence
Finding

Loading previous state from a local file establishes session persistence across runs, which is a meaningful capability increase in an analysis context. While persistence is not inherently unsafe, here it supports unattended monitoring behavior and retained history that should be explicitly justified, bounded, and disclosed.

Content

Scanner excerpt · references/market-monitoring-setup.md (reported line 87)May include surrounding context.

md
On each cron run, the agent:

1. **Fetch current data** via Gamma API
2. **Load previous state** from state file
3. **Compare thresholds:**

| Check | Condition | Alert |

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The multi-channel alerting instructions enable outbound delivery to WhatsApp, Telegram, and Discord, extending the skill beyond passive analysis into proactive communications. This creates risk of unsolicited messaging, information leakage, and abuse of integrated channels if the destination is misconfigured or manipulated.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
55% 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 · scripts/monitor-polymarket-market.py (reported line 99)May include surrounding context.

python
def load_state(market_id: str) -> dict:
    """Load previous state from file."""
    state_file = STATE_DIR / f"{market_id}.json"
    if state_file.exists():
        try:

Session Persistence

Medium
Category
Rogue Agent
Confidence
55% 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 · scripts/monitor-polymarket-market.py (reported line 214)May include surrounding context.

python
def load_state(market_id: str) -> dict:
    """Load previous state from file."""
    state_file = STATE_DIR / f"{market_id}.json"
    if state_file.exists():
        try:

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest describes the skill as analysis-only and explicitly says 'No execution', which implies read-only behavior rather than modifying state. This script creates a state directory and writes per-market JSON snapshots, so the actual behavior includes local side effects beyond pure analysis/output.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The skill explicitly supports fetching wallet-linked user positions and trade history but provides no privacy guidance, retention expectations, or warning about handling potentially sensitive behavioral data. Even though blockchain wallet data may be public, aggregating and profiling it can create privacy and compliance concerns, especially in a tracking-oriented context.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file documents endpoints for positions, trades, profit/loss, and leaderboard rank tied to a wallet address, which can expose user-linked financial activity. The file does not include any warning or disclosure about privacy implications when looking up or sharing wallet addresses.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill instructs users to query external APIs and monitor third-party wallet activity without any warning about privacy, legal, rate-limit, or terms-of-service considerations. While the data appears to be public blockchain and platform data, omission of a user-facing warning can still lead to unsafe or non-compliant collection practices, especially when users begin profiling wallet clusters or repeatedly polling external services.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code fetches market data from an external Polymarket API using HTTP, which transmits the user-supplied market identifier or slug over the network. While the module docstring says it fetches market data, there is no runtime notice, confirmation, or explicit warning to the user that input will be sent to a remote service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script saves market state under a local state directory, creating files on disk for each monitored market. Although this supports the script's monitoring purpose, there is no explicit user-facing warning in help text or output that running the script will create and update local state files.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.