T09 · Insecure Skill Coding Practices
- Location
trader.py:215- Finding
Weekend Market Constraint Is Calculated but Not Enforced
- Content
View full analysis
bool: """ Return True if the question describes a BTC price threshold market with a weekend or short-horizon time window. Generalised — not hardcoded to any specific price level. """ q = question.lower() has_btc = any(w in q for w in ("bitcoin", "btc", "btcusdt")) has_price = any(w in q for w in ("above", "reach", "hit", "exceed", "trade at", "surpass", "break", "touch")) has_level = any(c in q for c in ("usdt", "usd", "$")) or any( w in q for w in ("100k", "110k", "120k", "130k", "140k", "150k", "160k", "170k", "180k", "200k", "000 usdt", "000 usd")) has_window = any(w in q for w in ("weekend", "saturday", "sunday", "this week", "any time", "at any point", "between", "window")) return has_btc and has_price and has_level ``` ### Technical Analysis The function calculates `has_window` but omits it from the final Boolean expression. Consequently, the function accepts any question containing BTC terminology, threshold language, and a recognized price representation, even when the question has no weekend or bounded-time condition. This violates the function contract and the strategy's documented assumptions. The strategy's claimed probability model concerns first-passage events during a weekend window; applying it to markets with materially different resolution periods or semantics can produce invalid signals. The broad keyword discovery process increases exposure to this defect because candidate markets are not restricted to an authoritativ ...[truncated 1400 chars]- Remediation
View remediation
