diff --git a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll index b38659c17ae..93f2231b0be 100644 --- a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll +++ b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll @@ -159,7 +159,8 @@ module NotExposed { FindSubclassesSpec spec, string newAliasFullyQualified, ImportMember importMember, Module mod, Location loc ) { - importMember = newOrExistingModeling(spec).getAValueReachableFromSource().asExpr() and + importMember = + newOrExistingModeling(spec).getASubclass*().getAValueReachableFromSource().asExpr() and importMember.getScope() = mod and loc = importMember.getLocation() and (