Summary
Built-in symbol extraction regexes are compiled without explicit match timeouts or non-backtracking mode.
Evidence
src/CodeIndex/Indexer/Symbols/SymbolExtractor.cs defines many built-in new Regex(..., RegexOptions.Compiled) patterns. Workspace pattern regexes are tracked separately, but these built-in extractors still appear to run without a timeout/non-backtracking guarantee.
Impact
Even with per-file size limits, long or minified lines can turn regex extraction into excessive CPU use. This is a robustness and denial-of-service risk for untrusted repositories.
Suggested fix
Give built-in regexes explicit timeouts, convert safe patterns to RegexOptions.NonBacktracking where compatible, and add regression tests around adversarial long-line inputs.
Summary
Built-in symbol extraction regexes are compiled without explicit match timeouts or non-backtracking mode.
Evidence
src/CodeIndex/Indexer/Symbols/SymbolExtractor.csdefines many built-innew Regex(..., RegexOptions.Compiled)patterns. Workspace pattern regexes are tracked separately, but these built-in extractors still appear to run without a timeout/non-backtracking guarantee.Impact
Even with per-file size limits, long or minified lines can turn regex extraction into excessive CPU use. This is a robustness and denial-of-service risk for untrusted repositories.
Suggested fix
Give built-in regexes explicit timeouts, convert safe patterns to
RegexOptions.NonBacktrackingwhere compatible, and add regression tests around adversarial long-line inputs.