Add binding between annotation and sink-param

This commit is contained in:
ka1n4t
2022-11-22 18:32:14 +08:00
parent d799466e9d
commit ce2ba21240

View File

@@ -134,7 +134,8 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
.matches("${" + annotation.getValue("value").(CompileTimeConstantExpr).getStringValue() +
"%}") and
annotation.getType() instanceof TypeParam and
ma.getAnArgument() = node.asExpr()
ma.getAnArgument() = node.asExpr() and
annotation.getTarget() = ma.getMethod().getParameter(node.asExpr().getIndex())
)
or
// MyBatis default parameter sql injection vulnerabilities.the default parameter form of the method is arg[0...n] or param[1...n].