Skip to content

Commit b24e565

Browse files
committed
SubclassFinder: don't include site-packages
1 parent aa5eee1 commit b24e565

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

python/ql/lib/semmle/python/frameworks/internal/SubclassFinder.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,8 @@ module NotExposed {
112112
}
113113

114114
predicate isAllowedModule(Module mod) {
115-
// for now, we only want to model things in site-packages (since we know these are
116-
// libraries used by real code)
117-
mod.getFile().getAbsolutePath().matches("%/site-packages/%")
118-
or
119-
// for CI testing
120-
mod.getFile().getRelativePath().matches("%/find_subclass_test.py")
115+
// don't include anything found in site-packages
116+
exists(mod.getFile().getRelativePath())
121117
}
122118

123119
predicate isTestCode(AstNode ast) {

0 commit comments

Comments
 (0)