Source是上一个Flow的Sink
https://github.com/github/codeql/issues?q=MyBatis+
https://github.com/github/codeql/issues/6230
CodeQL只支持在使用org.apache.ibatis.jdbc.SqlRunner操作SQL语句时产生的SQL注入问题。
mapper.xml语句包含其他的XMLElement
https://github.com/github/codeql/pull/6411
定位Mapper.xml文件
import java
from XMLFile mapperXML
where mapperXML.getRelativePath().matches("%/resources/%")
select mapperXML
TODO:难题
当查询语句里面包含include语句时,进入到相应的sql中,当sql里面拼接了参数时,则认为目标查询语句存在SQL注入漏洞
在输出时利用$@输出查询语句对应的XML元素