Files
codeql/java/ql/lib/semmle/code/java/security/SecurityTests.qll
2022-02-21 17:05:00 +00:00

15 lines
541 B
Plaintext

/** Test detection for the security pack. */
import java
/** A test class that is not a Semmle class or a Juliet test suite class. */
class NonSecurityTestClass extends TestClass {
NonSecurityTestClass() {
not exists(RefType s | this.getAnAncestor().getSourceDeclaration() = s and s.fromSource() |
s.getLocation().getFile().getAbsolutePath().matches("%semmle%") or
s.getLocation().getFile().getAbsolutePath().matches("%ql/java/ql/test/%") or
s.getLocation().getFile().getAbsolutePath().matches("%CWE%")
)
}
}