mirror of
https://github.com/github/codeql.git
synced 2026-02-13 05:31:22 +01:00
15 lines
541 B
Plaintext
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%")
|
|
)
|
|
}
|
|
}
|