File tree Expand file tree Collapse file tree
java/ql/src/experimental/CWE-532 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,9 +31,10 @@ class CredentialExpr extends Expr {
3131class 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 )
You can’t perform that action at this time.
0 commit comments