T09 · Insecure Skill Coding Practices
- Location
mispricing_events.py:123- Finding
Market Safety Validation Fails Open When Context Retrieval Fails
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a disclosed automated trading bot, but its live-trading authority is paired with weak matching and fail-open safety checks that users should review carefully before installing.
Install only if you intend to run an automated prediction-market trader and are comfortable granting a Simmer API key that can place scheduled trades. Use the sim venue first, avoid live credentials until fail-closed portfolio/context checks and stronger market matching are fixed, and consider pinning dependencies before deployment.
mispricing_events.py:123Market Safety Validation Fails Open When Context Retrieval Fails
mispricing_events.py:389Portfolio Retrieval Failure Resets Position and Capital Safety State
clawhub.json:5Security-Critical Runtime Dependencies Are Not Version or Integrity Pinned
The skill is presented as a market-analysis strategy, but its behavior also includes trade execution, portfolio/position access, and market lookup through SimmerClient without corresponding declared permissions. That mismatch is dangerous because users may authorize what appears to be read-only analysis while the skill can perform state-changing financial actions and access account context.
The skill declares no explicit tool scope or permissions even though its documented behavior depends on environment-variable access and network/API access. In an agent system, missing capability declarations weaken reviewability and policy enforcement, making it easier for a skill to use sensitive resources without clear operator consent.
The module claims an edge based on consensus of 2+ prediction markets, but the trading logic permits execution with confidence >= 1, meaning one external source is enough. This mismatch is dangerous because operators may believe the strategy has stronger validation than it actually does, increasing the chance of unsafe autonomous trades based on thin evidence.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# API endpoints
GAMMA_URL = "https://gamma-api.polymarket.com"
CLOB_URL = "https://clob.polymarket.com"
KALSHI_URL = "https://api.elections.kalshi.com/trade-api/v2"
MANIFOLD_URL = "https://api.manifold.markets/v0"
# Caches (in-process, reset each run)
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
GAMMA_URL = "https://gamma-api.polymarket.com"
CLOB_URL = "https://clob.polymarket.com"
KALSHI_URL = "https://api.elections.kalshi.com/trade-api/v2"
MANIFOLD_URL = "https://api.manifold.markets/v0"
# Caches (in-process, reset each run)
_kalshi_cache = None
The skill description says trades should be confirmed by at least one external platform, but the implementation accepts a single fuzzy-matched external market with a low similarity threshold and immediately treats it as confirmation. In an automated trading agent, weak entity matching can cause the bot to trade unrelated or only loosely related markets, creating avoidable financial loss from false signals.
This code file places live or simulated trades automatically via client.trade(...), which is a safety-critical operation affecting portfolio state. While the module docstring describes the bot's trading purpose and runtime logs record activity, there is no explicit user confirmation or caution in this file warning that execution will submit trades when signals are found.