mirror of
https://github.com/github/codeql.git
synced 2026-04-27 17:55:19 +02:00
skip analyzing regular expressions in minified files for ReDoS
This commit is contained in:
@@ -112,7 +112,9 @@ class RegExpRoot extends RegExpTerm {
|
||||
// there are no lookbehinds
|
||||
not exists(RegExpLookbehind lbh | getRoot(lbh) = this) and
|
||||
// is actually used as a RegExp
|
||||
isUsedAsRegExp()
|
||||
isUsedAsRegExp() and
|
||||
// is not inside a minified file.
|
||||
not getRootTerm().getParent().(Expr).getTopLevel().isMinified()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user