mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
Refine polynomial redos sources to exclude length limited methods
This commit is contained in:
@@ -12,11 +12,11 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.security.performance.PolynomialReDosQuery
|
||||
import semmle.code.java.security.performance.PolynomialReDoSQuery
|
||||
import DataFlow::PathGraph
|
||||
|
||||
from DataFlow::PathNode source, DataFlow::PathNode sink, PolynomialBackTrackingTerm regexp
|
||||
where hasPolynomialReDosResult(source, sink, regexp)
|
||||
where hasPolynomialReDoSResult(source, sink, regexp)
|
||||
select sink, source, sink,
|
||||
"This $@ that depends on $@ may run slow on strings " + regexp.getPrefixMessage() +
|
||||
"with many repetitions of '" + regexp.getPumpString() + "'.", regexp, "regular expression",
|
||||
|
||||
Reference in New Issue
Block a user