T09 · Insecure Skill Coding Practices
- Location
scripts/score_candidates.py:292- Finding
Supply-risk verification can be bypassed using an unsubstantiated false value
- Content
View full analysis
= vwap execution_liquid = None if spread_pct is None else spread_pct <= 2.50 regular_supply_confirmed = None if regular_turnover is None else regular_turnover >= 1.00 supply_risk_clear = None if effective_supply_risk is None else not effective_supply_risk ``` The related source metadata is read but is not included in any validation gate: ```python supply_risk_type = str(row.get("supply_risk_type") or "UNKNOWN").strip() supply_risk_source = str(row.get("supply_risk_source") or "UNKNOWN").strip() supply_risk_checked_at = str(row.get("supply_risk_checked_at") or "UNKNOWN").strip() ``` ### Technical Analysis The scorer treats the caller-provided value `premarket_supply_risk=False` as conclusive proof that supply risk has been cleared. It does not require: - A non-placeholder `supply_risk_source`; - A valid, timezone-aware `supply_risk_checked_at`; - An allowed primary-source type; - Evidence that the review is recent; - Issuer-news verification fields required by `SKILL.md`; - Consistency between the supplied conclusion and supporting metadata. Consequently, the safety gate ...[truncated 1634 chars]- Remediation
View remediation
