Files
codeql/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql
2023-01-10 13:37:19 +01:00

19 lines
612 B
Plaintext

import java
import semmle.code.java.security.JexlInjectionQuery
import TestUtilities.InlineExpectationsTest
class JexlInjectionTest extends InlineExpectationsTest {
JexlInjectionTest() { this = "HasJexlInjectionTest" }
override string getARelevantTag() { result = "hasJexlInjection" }
override predicate hasActualResult(Location location, string element, string tag, string value) {
tag = "hasJexlInjection" and
exists(DataFlow::Node sink, JexlInjectionConfig conf | conf.hasFlowTo(sink) |
sink.getLocation() = location and
element = sink.toString() and
value = ""
)
}
}