mirror of
https://github.com/github/codeql.git
synced 2026-05-01 03:35:13 +02:00
Remove unused files and update qldoc
This commit is contained in:
@@ -1,20 +1,6 @@
|
||||
/**
|
||||
* @name Cleartext Credentials in Properties File
|
||||
* @description Finds cleartext credentials in Java properties files.
|
||||
* @kind problem
|
||||
* @id java/credentials-in-properties
|
||||
* @tags security
|
||||
* external/cwe/cwe-555
|
||||
* external/cwe/cwe-256
|
||||
* external/cwe/cwe-260
|
||||
*/
|
||||
|
||||
/*
|
||||
* Note this query requires properties files to be indexed before it can produce results.
|
||||
* If creating your own database with the CodeQL CLI, you should run
|
||||
* `codeql database index-files --language=properties ...`
|
||||
* If using lgtm.com, you should add `properties_files: true` to the index block of your
|
||||
* lgtm.yml file (see https://lgtm.com/help/lgtm/java-extraction#customizing-index)
|
||||
* Note this is similar to src/experimental/Security/CWE/CWE-555/CredentialsInPropertiesFile.ql
|
||||
* except we do not filter out test files.
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class MailConfig {
|
||||
@Value("${mail.password}")
|
||||
private String mailPassword;
|
||||
|
||||
@Value("${mail.username}")
|
||||
private String mailUserName;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
import java.io.IOException;
|
||||
import java.util.Properties;
|
||||
|
||||
public class PropertiesUtils {
|
||||
/* Properties declaration. */
|
||||
private static Properties properties;
|
||||
|
||||
/** Static block to initializing the properties. */
|
||||
static {
|
||||
properties = new Properties();
|
||||
try {
|
||||
properties.load(PropertiesUtils.class.getClassLoader().getResourceAsStream("configuration.properties"));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/** Returns the LDAP DN property value. */
|
||||
public static String getLdapDN() {
|
||||
return properties.getProperty("ldap.loginDN");
|
||||
}
|
||||
|
||||
/** Returns the LDAP password property value. */
|
||||
public static String getLdapPassword() {
|
||||
return properties.getProperty("ldap.password");
|
||||
}
|
||||
|
||||
/** Returns the SQL Server username property value. */
|
||||
public static String getMSDataSourceUserName() {
|
||||
return properties.getProperty("datasource1.username");
|
||||
}
|
||||
|
||||
/** Returns the SQL Server password property value. */
|
||||
public static String getMSDataSourcePassword() {
|
||||
return properties.getProperty("datasource1.password");
|
||||
}
|
||||
|
||||
/** Returns the AWS Access Key property value. */
|
||||
public static String getAWSAccessKey() {
|
||||
return properties.getProperty("com.example.aws.s3.access_key");
|
||||
}
|
||||
|
||||
/** Returns the AWS Secret Key property value. */
|
||||
public static String getAWSSecretKey() {
|
||||
return properties.getProperty("com.example.aws.s3.secret_key");
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/springframework-5.2.3
|
||||
Reference in New Issue
Block a user