T09 · Insecure Skill Coding Practices
- Location
SKILL.md:1208- Finding
Caller-Controlled Verification State Can Authorize Escrow Release
- Content
View full analysis
None: """Record a verified signal outcome.""" if not outcome.verified: raise ValueError( f"Signal {outcome.signal_id} is not verified. " "Only verified signals can be recorded." ) self._outcomes.append(outcome) ``` ```python def evaluate_subscription(client: SimpleClient, verifier: SignalVerifier, tracker: PerformanceTracker, escrow_id: str, provider_id: str, criteria: dict) -> dict: """Evaluate whether a subscription's performance criteria are met.""" # Compute current stats from verified data stats = tracker.compute_stats() checks = { "hit_rate": stats["hit_rate"] >= criteria.get("min_hit_rate", 0), "risk_reward": ( stats["risk_reward_ratio"] >= criteria.get("min_risk_reward", 0) ), "drawdown": ( stats["max_consecutive_losses"] <= criteria.get("max_drawdown", float("inf")) ), "signal_count": ( stats["total_signals"] >= criteria.get("min_signal_count", 0) ), } all_passed = all(checks.values()) if all_passed: release_result = client._execute("release_escrow", { "escrow_id": escrow_id, }) return { "status": "passed", "checks": checks, "stats": stats, "action": "escrow_released", "release_result": release_result, } ``` ### Technical Analysis The guide represents outcome verification with the mutable `SignalOutcome.verified` Boolean. An ...[truncated 2176 chars]- Remediation
View remediation
