mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Java: add a class for MyBatis Mapper methods that update a database
This commit is contained in:
@@ -27,3 +27,20 @@ private class SpringCsrfUnprotectedMethod extends CsrfUnprotectedMethod instance
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** A method that updates a database. */
|
||||
abstract class DatabaseUpdateMethod extends Method { }
|
||||
|
||||
/** A MyBatis Mapper method that updates a database. */
|
||||
private class MyBatisMapperDatabaseUpdateMethod extends DatabaseUpdateMethod {
|
||||
MyBatisMapperDatabaseUpdateMethod() {
|
||||
exists(MyBatisMapperSqlOperation mapperXml |
|
||||
(
|
||||
mapperXml instanceof MyBatisMapperInsert or
|
||||
mapperXml instanceof MyBatisMapperUpdate or
|
||||
mapperXml instanceof MyBatisMapperDelete
|
||||
) and
|
||||
this = mapperXml.getMapperMethod()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user