Java: update xpath sink kind to xpath-injection

This commit is contained in:
Jami Cogswell
2023-05-09 12:00:28 -04:00
parent 55be2e5b67
commit fc58d10a4e
6 changed files with 28 additions and 28 deletions

View File

@@ -275,10 +275,10 @@ module ModelValidation {
not kind =
[
"open-url", "jndi-injection", "ldap", "sql-injection", "jdbc-url", "logging", "mvel",
"xpath", "groovy", "xss", "ognl-injection", "intent-start", "pending-intent-sent",
"url-redirection", "create-file", "read-file", "write-file", "set-hostname-verifier",
"header-splitting", "information-leak", "xslt", "jexl", "bean-validation", "ssti",
"fragment-injection", "command-injection"
"xpath-injection", "groovy", "xss", "ognl-injection", "intent-start",
"pending-intent-sent", "url-redirection", "create-file", "read-file", "write-file",
"set-hostname-verifier", "header-splitting", "information-leak", "xslt", "jexl",
"bean-validation", "ssti", "fragment-injection", "command-injection"
] and
not kind.matches("regex-use%") and
not kind.matches("qltest%") and

View File

@@ -13,7 +13,7 @@ abstract class XPathInjectionSink extends DataFlow::Node { }
/** A default sink representing methods susceptible to XPath Injection attacks. */
private class DefaultXPathInjectionSink extends XPathInjectionSink {
DefaultXPathInjectionSink() {
sinkNode(this, "xpath")
sinkNode(this, "xpath-injection")
or
exists(ClassInstanceExpr constructor |
constructor.getConstructedType().getASourceSupertype*().hasQualifiedName("org.dom4j", "XPath")