You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ReDoS regression tests for 6 languages with zero current coverage (haskell, kotlin, lua, ruby, scala, swift) #1070
Six languages in tests/extraction/languages/ have literal zero ReDoS regression testing in their _strict.py files: haskell, kotlin, lua, ruby, scala, swift. Verified by grep -c for assert_redos_immune calls in each file.
This is a critical gap: an O(n²) backtracking bug in any of these languages' regex rules would go undetected. The shared test harness in tests/extraction/languages/_strict_harness.py provides the _best_of_timing method (geometric-growth payload scaling) which is the stronger ReDoS test than single-timeout checks.
Solution
For each of these 6 languages:
Add at least one _best_of_timing scaling-ratio test per language covering the most complex quantifier shapes in that language's regex rules (those most likely to exhibit O(n²) backtracking).
Reference tests/extraction/languages/_strict_harness.py for the _best_of_timing(candidate_regex, pathological_case_list, ...) signature and existing usage in languages like c, cpp, csharp for examples.
Activity