Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

predibase/lorax
main @ a7394ba
6
Fixes
0
CVEs
HIGH
Peak severity
75.0%
Coverage
Highlights
Denial of Service: 6 prior fixes. Scrutinize any change in this area.
router/src/validation.rs: most-fixed (2 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Denial of Service: Panics caused by using unwrap() on raw input tokenization results can crash the entire router service, allowing any invalid token sequence to cause a Denial of Service. Developers must replace direct unwraps with graceful match-based error handling.
Denial of Service: Unvalidated token sizes and empty inputs can bypass core allocation logic, leading to severe resource exhaustion during text generation. Rigid boundary validation on max_total_tokens must be enforced early in the request lifecycle.
Denial of Service: Inverted comparison logic in truncation limits could disable size-limiting constraints, leading to memory/compute exhaustion when parsing large inputs. Truncation boundaries must be thoroughly tested against edge cases.