We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a183b00 commit 5e36eedCopy full SHA for 5e36eed
java/ql/src/experimental/Security/CWE/CWE-489/ServletMain.ql
@@ -41,7 +41,8 @@ class ServletMainMethod extends Method {
41
this.isPublic() and
42
this.getNumberOfParameters() = 1 and
43
this.getParameter(0).getType() instanceof Array and
44
- not this.getDeclaringType().getName().matches("%Test%") // Simple check to exclude test classes to reduce FPs
+ not this.getDeclaringType().getName().toLowerCase().matches("%test%") and // Simple check to exclude test classes to reduce FPs
45
+ not this.getDeclaringType().getPackage().getName().toLowerCase().matches("%test%") // Simple check to exclude classes in test packages to reduce FPs
46
}
47
48
0 commit comments