Back to skill

Security audit

Kelly Criterion Bet Sizer

Security checks for vulnerabilities and agentic risk

Overview

This skill is a betting calculator, but it advertises safeguards it does not implement and includes an unsafe shell-command pattern.

Review this carefully before installing. Do not let an agent run the shown shell command with raw user-provided values; use a safer argument-array invocation or validated script instead. Also treat the output as informational only, because the skill does not actually enforce the advertised fractional, portfolio, or maximum-bet safeguards.

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

Error
Location
SKILL.md:43
Finding

Shell Command Injection Through Unquoted User-Controlled Arguments

Content
View full analysis
0 else 0 kelly_f = max(kelly_f, 0) # never negative implied_prob = 1 / decimal_odds edge = true_prob - implied_prob print(f'Odds: {odds_input} (decimal: {decimal_odds:.4f})') print(f'Implied prob: {implied_prob:.2%} | Your estimate: {true_prob:.2%} | Edge: {edge:.2%}') print(f'Kelly fraction: {kelly_f:.4f} ({kelly_f:.2%} of bankroll)') print(f'Recommended stake: \${kelly_f * bankroll:.2f} of \${bankroll:.2f} bankroll') if kelly_f <= 0: print('⚠️ No edge detected — Kelly says do not bet') elif kelly_f > 0.10: print('⚠️ Kelly > 10% — consider fractional Kelly to reduce variance') " BANKROLL ODDS TRUE_PROB ``` ### Technical Analysis The documented operation expects `BANKROLL`, `ODDS`, and `TRUE_PROB` to be replaced with values derived from user input. These placeholders are not enclosed in shell-safe quotes, and the instructions do not require validation before constructing the command. Although the Python code converts the values with `float()` and `int()`, those conversions occur only after the shell has parsed the command. Consequently, Python-side numeric conversion cannot prevent shell metacharacters in a substituted value from being interpreted by the shell. For example, replacing `BANKROLL` with a value containing `;`, command substitution syntax, redirection operators, or another sh ...[truncated 1907 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest advertises fractional Kelly, multi-bet portfolio sizing, and max-bet enforcement, but the implementation only performs a single full-Kelly calculation. This mismatch can cause downstream agents or users to rely on safety and risk-control features that do not actually exist, potentially leading to oversized or improperly allocated bets.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill is explicitly designed to guide wagering behavior and lacks any user opt-in, harm-minimization language, or jurisdictional/legal caveats. In context, this makes the skill more dangerous because it operationalizes financial-risk decisions and may encourage gambling activity without checks for legality, consent, or safer-use boundaries.

Content

No source excerpt is available for this finding.