Files
codeql/java/ql/test/query-tests/security/CWE-094/JexlInjectionTest.ql
2023-03-24 10:04:46 -04:00

19 lines
597 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 | JexlInjectionFlow::flowTo(sink) |
sink.getLocation() = location and
element = sink.toString() and
value = ""
)
}
}