We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eda7616 + 021e5ff commit 467aa64Copy full SHA for 467aa64
python/ql/src/semmle/python/security/performance/RegExpTreeView.qll
@@ -12,4 +12,8 @@ import semmle.python.RegexTreeView
12
*/
13
predicate isExcluded(RegExpParent parent) {
14
not exists(parent.getRegex().getLocation().getFile().getRelativePath())
15
+ or
16
+ // Regexes with many occurrences of ".*" may cause the polynomial ReDoS computation to explode, so
17
+ // we explicitly exclude these.
18
+ count(int i | exists(parent.getRegex().getText().regexpFind("\\.\\*", i, _)) | i) > 10
19
}
0 commit comments