mirror of
https://github.com/github/codeql.git
synced 2026-03-01 05:13:41 +01:00
Specifically Apache sshd defines its sensitive api calls on an inherited interface, and they need to be described that way for us to pick them up.
10 lines
490 B
Java
10 lines
490 B
Java
import com.amazonaws.auth.AWSCredentials;
|
|
import com.amazonaws.auth.BasicAWSCredentials;
|
|
|
|
public class HardcodedAWSCredentials {
|
|
public static void main(String[] args) {
|
|
//BAD: Hardcoded credentials for connecting to AWS services
|
|
//To fix the problem, use other approaches including AWS credentials file, environment variables, or instance/container credentials instead
|
|
AWSCredentials creds = new BasicAWSCredentials("ACCESS_KEY", "SECRET_KEY"); // $ HardcodedCredentialsApiCall
|
|
}
|
|
} |