Skip to content

Commit d9cc3c6

Browse files
authored
Add a comment for reasoning in why debug and trace are included and other variations are excluded
1 parent ffd442a commit d9cc3c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/ql/src/experimental/CWE-532/SensitiveInfoLog.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class LoggerType extends RefType {
4242
predicate isSensitiveLoggingSink(DataFlow::Node sink) {
4343
exists(MethodAccess ma |
4444
ma.getMethod().getDeclaringType() instanceof LoggerType and
45-
(ma.getMethod().hasName("debug") or ma.getMethod().hasName("trace")) and
45+
(ma.getMethod().hasName("debug") or ma.getMethod().hasName("trace")) and //Check low priority log levels which are more likely to be real issues to reduce false positives
4646
sink.asExpr() = ma.getAnArgument()
4747
)
4848
}

0 commit comments

Comments
 (0)