Skip to content

Commit bdcf419

Browse files
lcarteyaibaars
authored andcommitted
Add additional Hibernate SQL sinks
1 parent e3a12c5 commit bdcf419

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

java/ql/src/semmle/code/java/frameworks/Hibernate.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ class HibernateSession extends RefType {
1010
}
1111

1212
/**
13-
* Holds if `m` is a method on `HibernateSession` taking an SQL string as its
14-
* first argument.
13+
* Holds if `m` is a method on `HibernateSession`, or a subclass, taking an SQL
14+
* string as its first argument.
1515
*/
1616
predicate hibernateSqlMethod(Method m) {
17-
m.getDeclaringType() instanceof HibernateSession and
17+
m.getDeclaringType().getASourceSupertype*() instanceof HibernateSession and
1818
m.getParameterType(0) instanceof TypeString and
1919
(
2020
m.hasName("createQuery") or

0 commit comments

Comments
 (0)