Back to skill

Security audit

Polymarket Weather Scanner

Security checks for vulnerabilities and agentic risk

Overview

This skill can scan weather markets and place real-money Polymarket trades, but the trading path is under-scoped and handles local secrets too broadly.

Review this carefully before installing. Use dry-run or scan-only operation unless you intentionally want live Polymarket trading, do not keep unrelated secrets in this skill's .env file, and audit or provide a trusted trader.py before using --buy. Treat any wallet/private-key setup as real financial authority and set external account limits where possible.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
weather_scanner.py:376
Finding

Unnecessary Loading and Subprocess Propagation of Project Environment Secrets

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The documented purpose materially understates the actual behavior by omitting live trade execution, wallet/private-key use, and subprocess invocation. That mismatch is dangerous because users may authorize or run the skill believing it is only an analytics scanner, when it can access sensitive credentials and place real-money trades.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
## Requirements
- Python 3.9+
- requests library
- Optional: Visual Crossing API key (set in ~/.config/visualcrossing/credentials.json)

## Cities Tracked
Seoul, Tokyo, Shanghai, Ankara, Hong Kong, Tel Aviv, New York, Miami, Dallas, Atlanta, London, Buenos Aires, Sao Paulo, Seattle, Toronto, Wellington, Lucknow

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

This skill advertises and implements live Polymarket order execution (--buy) rather than staying limited to scanning and reporting. In the context of an agent skill, autonomous financial execution is materially more dangerous because it can spend funds, act on faulty signals, and trigger losses without adequate human review.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
87% confidence
Finding

The skill reads an API key from a local credentials file for Visual Crossing. Accessing local secrets is sensitive behavior, and in an agent-skill context it is more dangerous because the skill does not need to expose or manage third-party credentials unless that dependency is clearly justified and isolated.

Content

Scanner excerpt · weather_scanner.py (reported line 123)May include surrounding context.

python
def get_visual_crossing_forecast(city_cfg, target_date_str):
    """Visual Crossing API — high accuracy, global coverage, paid tier."""
    try:
        creds_path = Path.home() / ".config/visualcrossing/credentials.json"
        if not creds_path.exists():
            return None
        api_key = json.loads(creds_path.read_text()).get("api_key")

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The scanner reads a local .env file, which is commonly used to store sensitive secrets such as trading private keys. In this skill, that behavior is especially dangerous because the same module also supports live order execution, so local secret access directly enables financial actions if the skill is run or misused.

Content

Scanner excerpt · weather_scanner.py (reported line 389)May include surrounding context.

python
return plays

def load_env():
    env_path = Path(__file__).parent / ".env"
    if env_path.exists():
        for line in env_path.read_text().splitlines():
            line = line.strip()

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Spawning trader.py to buy shares is an unjustified capability for a scanner and bypasses clear separation between analysis and execution. This widens the attack surface because security review now depends on both files and on process invocation behavior, while any successful run can directly commit funds.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill advertises executable behavior that appears to require environment access, file reads, network access, and shell execution, but it declares no tool/permission scope. This creates a transparency and containment problem: a user or host system cannot accurately assess or restrict what the skill may access before running it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly documents a --buy mode for live market purchases but provides no warning that this can trigger real-money transactions or losses. In a trading skill, the lack of prominent risk disclosure and execution warning increases the chance of accidental or uninformed financial actions.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · weather_scanner.py (reported line 52)May include surrounding context.

python
}

GAMMA_API = "https://gamma-api.polymarket.com"
METEO_API = "https://api.open-meteo.com/v1/forecast"
VISUAL_CROSSING_API = "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline"

# ── Thresholds ─────────────────────────────────────────────────────────────────

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code loads .env values and uses PRIVATE_KEY and WALLET_ADDRESS to initialize a trading client, which is not necessary for a scanner-only capability. Access to live trading credentials significantly raises risk because any misuse of this skill or downstream code can place orders or expose sensitive wallet-linked access.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
91% confidence
Finding

The script launches an external trader.py process to place market orders, crossing from analysis into execution. Although it avoids shell injection by passing an argument list, this still creates a dangerous execution path because any compromise or unexpected behavior in trader.py can result in live trades using loaded credentials and funds.

Content

Scanner excerpt · weather_scanner.py (reported line 414)May include surrounding context.

python
import subprocess
    cmd = ["python3", str(Path(__file__).parent / "trader.py"),
           "--buy", "--slug", slug, "--yes", "--size", str(round(size, 2)), "--confirm"]
    r = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
    out = (r.stdout + r.stderr).strip()
    ok = any(x in out.lower() for x in ["matched", "delayed", "success", "order placed"])
    return ok, out

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The top-level docstring says the strategy is to fetch Open-Meteo forecasts and compare them to Polymarket pricing, implying a narrower data pipeline. In reality, the implementation also uses METAR observations, GFS/HRRR for US cities, and Visual Crossing consensus logic, which materially changes the described method.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The displayed timestamp is explicitly labeled as UTC in the main user output. This imposes a specific locale/time representation on all users without opt-in or explanation, which matches the policy category for forced language/locale behavior.

Content

No source excerpt is available for this finding.