diff --git a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll index 5aa039a9f26..c6dfcb90ad3 100644 --- a/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll +++ b/python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll @@ -113,7 +113,8 @@ module NotExposed { predicate isAllowedModule(Module mod) { // don't include anything found in site-packages - exists(mod.getFile().getRelativePath()) + exists(mod.getFile().getRelativePath()) and + not mod.getFile().getRelativePath().regexpMatch("(?i)(^|/)examples?/.*") } predicate isTestCode(AstNode ast) {