mirror of
https://github.com/github/codeql.git
synced 2026-01-31 07:12:57 +01:00
20 lines
694 B
Plaintext
20 lines
694 B
Plaintext
import java
|
|
import TestUtilities.InlineExpectationsTest
|
|
import semmle.code.java.security.performance.PolynomialReDoSQuery
|
|
|
|
class HasPolyRedos extends InlineExpectationsTest {
|
|
HasPolyRedos() { this = "HasPolyRedos" }
|
|
|
|
override string getARelevantTag() { result = "hasPolyRedos" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasPolyRedos" and
|
|
exists(DataFlow::PathNode source, DataFlow::PathNode sink, PolynomialBackTrackingTerm regexp |
|
|
hasPolynomialReDoSResult(source, sink, regexp) and
|
|
location = sink.getNode().getLocation() and
|
|
element = sink.getNode().toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|