Skip to content

Commit

Permalink
Add additional Hibernate SQL sinks
Browse files Browse the repository at this point in the history
  • Loading branch information
lcartey authored and aibaars committed Aug 7, 2020
1 parent e3a12c5 commit bdcf419
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions java/ql/src/semmle/code/java/frameworks/Hibernate.qll
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ class HibernateSession extends RefType {
}

/**
* Holds if `m` is a method on `HibernateSession` taking an SQL string as its
* first argument.
* Holds if `m` is a method on `HibernateSession`, or a subclass, taking an SQL
* string as its first argument.
*/
predicate hibernateSqlMethod(Method m) {
m.getDeclaringType() instanceof HibernateSession and
m.getDeclaringType().getASourceSupertype*() instanceof HibernateSession and
m.getParameterType(0) instanceof TypeString and
(
m.hasName("createQuery") or
Expand Down

0 comments on commit bdcf419

Please sign in to comment.