diff --git a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll index 36626677dc1..1861eeea6ab 100644 --- a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll +++ b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll @@ -162,7 +162,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 (