T09 · Insecure Skill Coding Practices
Error
- Location
SKILL.md:29- Finding
Arbitrary Python Code Execution Through Unsanitized Odds Substitution
- Content
View full analysis
0: impl = 100 / (odds + 100) else: impl = 0.5 dec = round(1 / impl, 4) if impl > 0 else 0 from fractions import Fraction frac = Fraction(1 - impl, impl).limit_denominator(100) if impl > 0 else 'N/A' kalshi = round(impl, 2) print(f'American: {odds:+d}') print(f'Decimal: {dec}') print(f'Fractional: {frac}') print(f'Implied Prob: {impl*100:.2f}%') print(f'Kalshi Price: \${kalshi}') " ``` The same unsafe source-code substitution pattern appears in the other operations: ```bash python3 -c " dec = DEC impl = 1 / dec if dec > 0 else 0 ... " ``` ```bash python3 -c " num, den = NUM, DEN dec = round((num / den) + 1, 4) ... " ``` ```bash python3 -c " impl = PROB dec = round(1 / impl, 4) if impl > 0 else 0 ... " ``` ```bash python3 -c " odds_list = [-150, +200, -110, +300, -400] ... " ``` The batch-conversion instructions explicitly direct the agent to replace the embedded list with supplied values, exposing the same issue if list elements are not independently parsed as numbers. ### Technical Analysis `python3 -c` evaluates its argument as executable Python source. The placeholders `ODDS`, `DEC`, `NUM`, `DEN`, and `PROB` are positioned directly in Python expressions rather than being received through a data-only interface. If an agent performs the req ...[truncated 2765 chars]- Remediation
View remediation
