You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
730 B
21 lines
730 B
1 year ago
|
import org.slf4j.Logger;
|
||
|
import org.slf4j.LoggerFactory;
|
||
|
|
||
|
public class ExampleClass {
|
||
|
private static final Logger logger = LoggerFactory.getLogger(ExampleClass.class);
|
||
|
|
||
|
public void sensitiveOperation() {
|
||
|
String password = "password";
|
||
|
String token = "password";
|
||
|
String secret = "password";
|
||
|
|
||
|
|
||
|
logger.error(password); // Noncompliant {{日志中包含敏感信息}}
|
||
|
logger.info(token); // Noncompliant {{日志中包含敏感信息}}
|
||
|
logger.debug(secret); // Noncompliant {{日志中包含敏感信息}}
|
||
|
logger.warn(password); // Noncompliant {{日志中包含敏感信息}}
|
||
|
logger.trace(password); // Noncompliant {{日志中包含敏感信息}}
|
||
|
|
||
|
}
|
||
|
}
|