T09 · Insecure Skill Coding Practices
- Location
scripts/vet_translator.py:243- Finding
Unvalidated Units and Numeric Values Can Produce Incorrect Veterinary Lab Interpretations
- Content
View full analysis
cut else "non-proteinuric")) if bp is not None: if bp < 140: sub = "normotensive" elif bp < 160: sub = "borderline hypertensive" elif bp < 180: sub = "hypertensive" else: sub = "severe hypertensive" substages.append(("blood pressure", sub)) return {"stage": stage, "substages": substages} ``` ```python c = sub.add_parser("ckd", help="IRIS CKD staging") c.add_argument("--species", required=True, choices=["cat", "dog"]) c.add_argument("--crea", required=True, type=float) c.add_argument("--sdma", type=float) c.add_argument("--upc", type=float) c.add_argument("--bp", type=float) ``` ### Technical Analysis Laboratory reference ranges in the application are hard-coded to specific units, such as `mg/dL`, but `parse_results()` extracts only a marker name and an unsigned numeric value. It does not capture, verify, or convert the unit accompanyin ...[truncated 2714 chars]- Remediation
View remediation
