Skip to content

Commit 6d329bc

Browse files
committed
Add Apache Commons Logging and debugv method
1 parent 9affa15 commit 6d329bc

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ class CredentialExpr extends Expr {
3131
class LoggerType extends RefType {
3232
LoggerType() {
3333
this.hasQualifiedName("org.apache.log4j", "Category") or //Log4J
34-
this.hasQualifiedName("org.apache.logging.log4j", "Logger") or //Log4J 2
34+
this.hasQualifiedName("org.apache.logging.log4j", "Logger") or //Log4j 2
3535
this.hasQualifiedName("org.slf4j", "Logger") or //SLF4j and Gradle Logging
36-
this.hasQualifiedName("org.jboss.logging", "BasicLogger") //JBoss Logging
36+
this.hasQualifiedName("org.jboss.logging", "Logger") or //JBoss Logging
37+
this.hasQualifiedName("org.apache.commons.logging", "Log") //Apache Commons Logging
3738
}
3839
}
3940

@@ -43,7 +44,8 @@ predicate isSensitiveLoggingSink(DataFlow::Node sink) {
4344
(
4445
ma.getMethod().hasName("debug") or
4546
ma.getMethod().hasName("trace") or
46-
ma.getMethod().hasName("debugf")
47+
ma.getMethod().hasName("debugf") or
48+
ma.getMethod().hasName("debugv")
4749
) and //Check low priority log levels which are more likely to be real issues to reduce false positives
4850
sink.asExpr() = ma.getAnArgument()
4951
)

0 commit comments

Comments
 (0)