@@ -10,16 +10,16 @@ import semmle.code.java.frameworks.MyBatis
1010import semmle.code.java.frameworks.Hibernate
1111
1212/** A sink for database query language injection vulnerabilities. */
13- abstract class QueryInjectionSink extends DataFlow:: ExprNode { }
13+ abstract class QueryInjectionSink extends DataFlow:: Node { }
1414
1515/** A sink for SQL injection vulnerabilities. */
1616private class SqlInjectionSink extends QueryInjectionSink {
1717 SqlInjectionSink ( ) {
18- this .getExpr ( ) instanceof SqlExpr
18+ this .asExpr ( ) instanceof SqlExpr
1919 or
2020 exists ( MethodAccess ma , Method m , int index |
2121 ma .getMethod ( ) = m and
22- ma .getArgument ( index ) = this .getExpr ( )
22+ ma .getArgument ( index ) = this .asExpr ( )
2323 |
2424 index = m .( SQLiteRunner ) .sqlIndex ( )
2525 or
@@ -38,7 +38,7 @@ private class SqlInjectionSink extends QueryInjectionSink {
3838private class PersistenceQueryInjectionSink extends QueryInjectionSink {
3939 PersistenceQueryInjectionSink ( ) {
4040 // the query (first) argument to a `createQuery` or `createNativeQuery` method on `EntityManager`
41- exists ( MethodAccess call , TypeEntityManager em | call .getArgument ( 0 ) = this .getExpr ( ) |
41+ exists ( MethodAccess call , TypeEntityManager em | call .getArgument ( 0 ) = this .asExpr ( ) |
4242 call .getMethod ( ) = em .getACreateQueryMethod ( ) or
4343 call .getMethod ( ) = em .getACreateNativeQueryMethod ( )
4444 // note: `createNamedQuery` is safe, as it takes only the query name,
0 commit comments