mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
23 lines
747 B
Plaintext
23 lines
747 B
Plaintext
import java
|
|
import semmle.code.java.dataflow.TaintTracking
|
|
import semmle.code.java.dataflow.FlowSources
|
|
import semmle.code.java.security.MvelInjectionQuery
|
|
import TestUtilities.InlineExpectationsTest
|
|
|
|
class HasMvelInjectionTest extends InlineExpectationsTest {
|
|
HasMvelInjectionTest() { this = "HasMvelInjectionTest" }
|
|
|
|
override string getARelevantTag() { result = "hasMvelInjection" }
|
|
|
|
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
|
tag = "hasMvelInjection" and
|
|
exists(DataFlow::Node src, DataFlow::Node sink, MvelInjectionFlowConfig conf |
|
|
conf.hasFlow(src, sink)
|
|
|
|
|
sink.getLocation() = location and
|
|
element = sink.toString() and
|
|
value = ""
|
|
)
|
|
}
|
|
}
|