We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d799466 commit ce2ba21Copy full SHA for ce2ba21
java/ql/src/experimental/Security/CWE/CWE-089/MyBatisCommonLib.qll
@@ -134,7 +134,8 @@ predicate isMybatisXmlOrAnnotationSqlInjection(
134
.matches("${" + annotation.getValue("value").(CompileTimeConstantExpr).getStringValue() +
135
"%}") and
136
annotation.getType() instanceof TypeParam and
137
- ma.getAnArgument() = node.asExpr()
+ ma.getAnArgument() = node.asExpr() and
138
+ annotation.getTarget() = ma.getMethod().getParameter(node.asExpr().getIndex())
139
)
140
or
141
// MyBatis default parameter sql injection vulnerabilities.the default parameter form of the method is arg[0...n] or param[1...n].
0 commit comments