T09 · Insecure Skill Coding Practices
- Location
SKILL.md:421- Finding
Unvalidated pricing rates can trigger division by zero
- Content
View full analysis
- Remediation
View remediation
= 1 for rate in rates): raise ValueError("Each rate must be greater than or equal to 0 and less than 1.") target_denominator = 1 - total_cost_rate - target_gross_margin breakeven_denominator = 1 - total_cost_rate if target_denominator <= 0: raise ValueError("Combined cost rates and target margin must be less than 1.") if breakeven_denominator <= 0: raise ValueError("Combined cost rates must be less than 1.") min_selling_price = cost_price / target_denominator recommended_price_b = cost_price / breakeven_denominator ``` ]]>
