mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
19 lines
596 B
Plaintext
19 lines
596 B
Plaintext
import java
|
|
import utils.test.InlineExpectationsTest
|
|
import semmle.code.java.security.regexp.RegexInjectionQuery
|
|
|
|
module RegexInjectionTest implements TestSig {
|
|
string getARelevantTag() { result = "hasRegexInjection" }
|
|
|
|
predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasRegexInjection" and
|
|
exists(RegexInjectionFlow::PathNode sink | RegexInjectionFlow::flowPath(_, sink) |
|
|
location = sink.getNode().getLocation() and
|
|
element = sink.getNode().toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|
|
|
|
import MakeTest<RegexInjectionTest>
|