mirror of
https://github.com/github/codeql.git
synced 2026-02-28 21:03:50 +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.
11 lines
403 B
Java
11 lines
403 B
Java
import ch.ethz.ssh2.Connection;
|
|
import java.io.IOException;
|
|
|
|
public class HardcodedGanymedSsh2Credentials {
|
|
public static void main(Connection conn) {
|
|
// BAD: Hardcoded credentials used for the session username and/or password.
|
|
try {
|
|
conn.authenticateWithPassword("username", "password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
|
} catch(IOException e) { }
|
|
}
|
|
} |