Back to skill

Security audit

Polymarket Politics Random 1U

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Polymarket trading template, but it can place recurring real-money trades with weak limits and asks for more sensitive wallet access than its code uses.

Review this carefully before installing. Use dry-run only unless you fully understand the trading behavior, do not provide a raw wallet private key, avoid setting RUN_LIVE for scheduled runs, and set strict external account limits if you test live trading.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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
Findings (5)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:27
Finding

Unnecessary Collection of a Wallet Private Key

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
politics_random_1u.py:43
Finding

AION API Credential Can Be Bound to an Unrestricted Base URL

Content
View full analysis
Any: api_key = get_api_key() base_url = os.getenv("AIONMARKET_BASE_URL") try: return AionClient(api_key=api_key, venue="polymarket") except TypeError: kwargs: Dict[str, Any] = {"api_key": api_key} if base_url: kwargs["base_url"] = base_url return AionClient(**kwargs) ``` ### Technical Analysis The compatibility fallback accepts `AIONMARKET_BASE_URL` directly from the environment and passes it to a client that is also initialized with the AION API key. The code does not require HTTPS, validate the URL, or restrict the hostname to an approved AION service. The dangerous branch is reached when the first constructor call raises `TypeError`, such as when the installed SDK exposes a different constructor signature. Subsequent market, context, and trade operations use this client. Depending on SDK behavior, authenticated requests can therefore be directed to an attacker-controlled endpoint. An untrusted endpoint can also return fabricated market and context data. In live mode, this could influence which market identifier the script chooses and what transaction it attempts to submit. ### Attack Path 1. An attacker, compromised deployment configuration, or unsafe environment sets `AIONMARKET_BASE_URL` to an attacker-controlled URL. 2. The installed SDK causes `AionClient(api_key=..., venue="polymarket")` to raise `TypeError`. 3. The fallback constructs the client with both the API key and attacker-controlled `base_url`. 4. The script invokes `get_markets` and `get_market_context`, and may invoke `trade`. 5. The malicious endpoint receives authenticated requests or returns spoofed responses intended to influence execution. ### Impact Assessment The potential scope includes disclosure of the ...[truncated 294 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
politics_random_1u.py:143
Finding

Unchecked Environment Variable Overrides the Advertised USD 1 Trade Limit

Content
View full analysis
Remediation
View remediation

T06 · System Persistence

Error
Location
clawhub.json:43
Finding

Persistent Environment Flag Enables Recurring Autonomous Live Trades

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
clawhub.json:4
Finding

Executable AION SDK Dependency Is Not Version-Pinned

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill requests and uses sensitive environment-provided secrets such as an API key and optional wallet private key, but the manifest does not declare any explicit tool scope or permissions boundary. That omission weakens reviewability and least-privilege enforcement, making it easier for a skill with trading capability to access secrets without clear operator awareness.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill enables real-money trading and mentions live execution, but it does not give a prominent, explicit warning that live mode can cause irreversible financial loss or unintended trades. In a trading context, especially one using random market selection and optional private-key-backed execution, weak user warnings materially increase the risk of accidental harmful use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill is configured to run automatically every 30 minutes, but the schedule definition in this file provides no scoping, gating, or safety constraints on when automated execution should be suppressed. In the context of a trading skill that can place live Polymarket trades using an API key and optionally a wallet private key, broad recurring invocation increases the risk of unintended or repeated financial actions if downstream safeguards are weak or environment flags are misconfigured.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code will place a real trade whenever --live is passed or RUN_LIVE is set, but at execution time it does not present an explicit interactive confirmation or prominent user-facing warning before calling client.trade(). Because this skill is specifically designed to submit financial transactions on a real venue, accidental invocation, environment misconfiguration, or automation misuse can lead to unintended real-money trades.

Content

No source excerpt is available for this finding.