Back to skill

Security audit

CLAWDEBET

Security checks for vulnerabilities and agentic risk

Overview

This gambling advice skill is disclosed as betting-related, but it overstates its capabilities and advertises safety controls that the code does not actually enforce.

Review this carefully before installing. Treat it as simple gambling decision support, not a predictive AI system, and do not connect it to automated real-money betting unless you add independent hard limits, user confirmation for each wager, jurisdiction and age checks, and responsible-gambling controls. Do not rely on the advertised safety features as enforced by the included code.

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
scripts/recommend.py:54
Finding
Documented Betting Safety Controls Are Not Enforced<![CDATA[ ## Vulnerability Details **File Location**: `scripts/recommend.py:54-128`; related configuration at `config/default.json:10-13, 42-44` and claims at `SKILL.md:94-98` **Vulnerability Type**: Missing enforcement of configured financial safety controls **Risk Level**: Medium ### Evidence The default configuration defines session, cooldown, loss, and profit-protection controls: ```json "maxBetsPerSession": 100, "maxSessionMinutes": 120, "cooldownAfterLosses": 5, "cooldownMinutes": 5, ``` ```json "riskManagement": { "maxConsecutiveLosses": 8, "profitLockPercent": 50, "profitLockThreshold": 1.5, "tiltDetection": true, "tiltThreshold": 3 } ``` The documentation presents these controls as active safety features: ```markdown ## Safety Features - **Tilt Detection**: Warns when betting patterns indicate emotional decisions - **Session Limits**: Enforces time and loss limits - **Profit Locking**: Auto-protects portion of winnings - **Reality Checks**: Periodic reminders ``` However, the recommendation interface receives neither session duration nor bet count: ```python def get_recommendation( bankroll: float, current_balance: float, session_profit: float, consecutive_losses: int, recent_history: List[float], strategy: str = "balanced", config: Optional[Dict] = None ) -> BetRecommendation: ``` Only immediate balance thresholds and a consecutive-loss cooldown decision are implemented: ```python # Check stop-loss stop_loss_threshold = bankroll * (1 - config["stopLossPercent"] / 100) if current_balance <= stop_loss_threshold: return BetRecommendation( should_bet=False, amount=0, target_multiplier=0, confidence=100, risk_level="stop", reasoning="Stop-loss triggered. Session should end.", stop_loss_hit=True ) # Check take-profit take_profit_threshold = bankroll * (1 + config["takeProfitPercent"] / 100) if current_balance >= take_profit_threshold: return ...[truncated 3114 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Extend the recommendation state with explicit inputs for: - Session start time or elapsed session duration. - Number of bets placed during the session. - Cooldown start and expiry times. - Locked-profit amount and available betting balance. - Whether a maximum-loss termination state has already been reached. 2. Enforce all limits before any path can return `should_bet=True`: - Stop when `maxBetsPerSession` is reached. - Stop when `maxSessionMinutes` is reached. - Return a terminal session result when `maxConsecutiveLosses` is reached. - Keep returning `should_bet=False` until `cooldownMinutes` has elapsed. - Exclude locked profits from the balance used to calculate bets. 3. Distinguish advisory outcomes from mandatory controls. Introduce explicit result states such as `session_limit`, `cooldown`, `max_losses`, `stop_loss`, and `profit_locked`. 4. Validate configuration values and reject negative, non-finite, contradictory, or out-of-range percentages, durations, balances, and counters. 5. Add unit and integration tests at each boundary, including: - One bet before, exactly at, and one bet after the bet limit. - One minute before, exactly at, and after the duration limit. - Cooldown requests before and after expiry. - Maximum consecutive-loss termination. - Profit-lock calculations and prevention of betting locked funds. 6. Until these controls are implemented, remove or qualify statements that session limits are enforced and profits are automatically protected. Documentation should clearly identify controls that callers must implement independently. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding
The skill materially overstates its capabilities by advertising AI-powered, multi-game betting advice, bankroll management, and strategy optimization while the underlying implementation reportedly only performs limited crash-history heuristics. In a gambling context, this can mislead users or downstream agents into making financial decisions based on inaccurate assumptions about sophistication, coverage, and safety controls.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The guide provides concrete betting recommendations, confidence scores, and strategy framing without a prominent warning that users can lose real money and that past game history does not reliably predict future outcomes. In a skill explicitly marketed for automated betting bots, this can encourage overreliance on the system and normalize risky gambling behavior.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The session-flow example demonstrates an open-ended betting loop that repeatedly requests recommendations and places bets, but it lacks explicit warnings about compulsive use, addiction risk, or bankroll depletion. Because the skill is intended for automated betting workflows, this pattern materially increases the chance of sustained, impulsive, or unattended gambling losses.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
This is a true safety issue: the document provides detailed gambling strategies, progression systems, recovery advice, and bankroll guidance in a way that can encourage sustained or escalated betting behavior, while only briefly acknowledging risk at the very end. The skill context makes this more dangerous because it is explicitly marketed for automated betting bots and strategy optimization, which can normalize harmful gambling behavior and financial loss without prominent upfront harm-reduction messaging.

Static analysis

No suspicious patterns detected.