mirror of
https://github.com/github/codeql.git
synced 2026-04-29 02:35:15 +02:00
Merge pull request #10041 from smowton/AddSensitiveApiCalls
Java: support more libraries in hardcoded-credentials queries
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* The query `java/hardcoded-credential-api-call` now recognises methods that consume usernames, passwords and keys from the JSch, Ganymed, Apache SSHD, sshj, Trilead SSH-2, Apache FTPClient and MongoDB projects.
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Provides classes and predicates relating to hardcoded credentials.
|
||||
*/
|
||||
|
||||
import java
|
||||
import SensitiveApi
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Provides a data-flow configuration for tracking a hard-coded credential in a call to a sensitive Java API which may compromise security.
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import HardcodedCredentials
|
||||
|
||||
/**
|
||||
* A data-flow configuration that tracks flow from a hard-coded credential in a call to a sensitive Java API which may compromise security.
|
||||
*/
|
||||
class HardcodedCredentialApiCallConfiguration extends DataFlow::Configuration {
|
||||
HardcodedCredentialApiCallConfiguration() { this = "HardcodedCredentialApiCallConfiguration" }
|
||||
|
||||
override predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr() instanceof HardcodedExpr and
|
||||
not n.asExpr().getEnclosingCallable() instanceof ToStringMethod
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof CredentialsApiSink }
|
||||
|
||||
override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
|
||||
node1.asExpr().getType() instanceof TypeString and
|
||||
(
|
||||
exists(MethodAccess ma | ma.getMethod().hasName(["getBytes", "toCharArray"]) |
|
||||
node2.asExpr() = ma and
|
||||
ma.getQualifier() = node1.asExpr()
|
||||
)
|
||||
or
|
||||
// These base64 routines are usually taint propagators, and this is not a general
|
||||
// TaintTracking::Configuration, so we must specifically include them here
|
||||
// as a common transform applied to a constant before passing to a remote API.
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod()
|
||||
.hasQualifiedName([
|
||||
"java.util", "cn.hutool.core.codec", "org.apache.shiro.codec",
|
||||
"apache.commons.codec.binary", "org.springframework.util"
|
||||
], ["Base64$Encoder", "Base64$Decoder", "Base64", "Base64Utils"],
|
||||
[
|
||||
"encode", "encodeToString", "decode", "decodeBase64", "encodeBase64",
|
||||
"encodeBase64Chunked", "encodeBase64String", "encodeBase64URLSafe",
|
||||
"encodeBase64URLSafeString"
|
||||
])
|
||||
|
|
||||
node1.asExpr() = ma.getArgument(0) and
|
||||
node2.asExpr() = ma
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override predicate isBarrier(DataFlow::Node n) {
|
||||
n.asExpr().(MethodAccess).getMethod() instanceof MethodSystemGetenv
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Provides classes and predicates to detect comparing a parameter to a hard-coded credential.
|
||||
*/
|
||||
|
||||
import java
|
||||
import HardcodedCredentials
|
||||
|
||||
/**
|
||||
* A call to a method that is or overrides `java.lang.Object.equals`.
|
||||
*/
|
||||
class EqualsAccess extends MethodAccess {
|
||||
EqualsAccess() { getMethod() instanceof EqualsMethod }
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `sink` compares password `p` against a hardcoded expression `source`.
|
||||
*/
|
||||
predicate isHardcodedCredentialsComparison(
|
||||
EqualsAccess sink, HardcodedExpr source, PasswordVariable p
|
||||
) {
|
||||
source = sink.getQualifier() and
|
||||
p.getAnAccess() = sink.getArgument(0)
|
||||
or
|
||||
source = sink.getArgument(0) and
|
||||
p.getAnAccess() = sink.getQualifier()
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
* Provides classes to detect using a hard-coded credential in a sensitive call.
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import semmle.code.java.dataflow.DataFlow2
|
||||
import HardcodedCredentials
|
||||
|
||||
/**
|
||||
* A data-flow configuration that tracks hardcoded expressions flowing to a parameter whose name suggests
|
||||
* it may be a credential, excluding those which flow on to other such insecure usage sites.
|
||||
*/
|
||||
class HardcodedCredentialSourceCallConfiguration extends DataFlow::Configuration {
|
||||
HardcodedCredentialSourceCallConfiguration() {
|
||||
this = "HardcodedCredentialSourceCallConfiguration"
|
||||
}
|
||||
|
||||
override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof HardcodedExpr }
|
||||
|
||||
override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof FinalCredentialsSourceSink }
|
||||
}
|
||||
|
||||
/**
|
||||
* A data-flow configuration that tracks flow from an argument whose corresponding parameter name suggests
|
||||
* a credential, to an argument to a sensitive call.
|
||||
*/
|
||||
class HardcodedCredentialSourceCallConfiguration2 extends DataFlow2::Configuration {
|
||||
HardcodedCredentialSourceCallConfiguration2() {
|
||||
this = "HardcodedCredentialSourceCallConfiguration2"
|
||||
}
|
||||
|
||||
override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof CredentialsSourceSink }
|
||||
|
||||
override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof CredentialsSink }
|
||||
}
|
||||
|
||||
/**
|
||||
* An argument to a call, where the parameter name corresponding
|
||||
* to the argument indicates that it may contain credentials, and
|
||||
* where this expression does not flow on to another `CredentialsSink`.
|
||||
*/
|
||||
class FinalCredentialsSourceSink extends CredentialsSourceSink {
|
||||
FinalCredentialsSourceSink() {
|
||||
not exists(HardcodedCredentialSourceCallConfiguration2 conf, CredentialsSink other |
|
||||
this != other
|
||||
|
|
||||
conf.hasFlow(DataFlow::exprNode(this), DataFlow::exprNode(other))
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Provides a predicate identifying assignments of harcoded values to password fields.
|
||||
*/
|
||||
|
||||
import java
|
||||
import HardcodedCredentials
|
||||
|
||||
/**
|
||||
* Holds if non-empty constant value `e` is assigned to password field `f`.
|
||||
*/
|
||||
predicate passwordFieldAssignedHardcodedValue(PasswordVariable f, CompileTimeConstantExpr e) {
|
||||
f instanceof Field and
|
||||
f.getAnAssignedValue() = e and
|
||||
not e.(StringLiteral).getValue() = ""
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Provides predicates defining methods that consume sensitive data, such as usernames and passwords.
|
||||
*/
|
||||
|
||||
import java
|
||||
|
||||
/**
|
||||
@@ -438,6 +442,49 @@ private predicate otherApiCallableCredentialParam(string s) {
|
||||
"com.azure.identity.UsernamePasswordCredentialBuilder;username(String);0",
|
||||
"com.azure.identity.UsernamePasswordCredentialBuilder;password(String);0",
|
||||
"com.azure.identity.ClientSecretCredentialBuilder;clientSecret(String);0",
|
||||
"org.apache.shiro.mgt.AbstractRememberMeManager;setCipherKey(byte[]);0"
|
||||
"org.apache.shiro.mgt.AbstractRememberMeManager;setCipherKey(byte[]);0",
|
||||
"com.jcraft.jsch.JSch;getSession(String, String, int);0",
|
||||
"com.jcraft.jsch.JSch;getSession(String, String);0",
|
||||
"ch.ethz.ssh2.Connection;authenticateWithPassword(String, String);0",
|
||||
"org.apache.sshd.client.session.ClientSessionCreator;connect(String, String, int);0",
|
||||
"org.apache.sshd.client.session.ClientSessionCreator;connect(String, SocketAddress);0",
|
||||
"net.schmizz.sshj.SSHClient;authPassword(String, char[]);0",
|
||||
"net.schmizz.sshj.SSHClient;authPassword(String, String);0",
|
||||
"com.sshtools.j2ssh.authentication.SshAuthenticationClient;setUsername(String);0",
|
||||
"com.sshtools.j2ssh.authentication.PasswordAuthenticationClient;setUsername(String);0",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPassword(String, String);0",
|
||||
"com.trilead.ssh2.Connection;authenticateWithDSA(String, String, String);0",
|
||||
"com.trilead.ssh2.Connection;authenticateWithNone(String);0",
|
||||
"com.trilead.ssh2.Connection;getRemainingAuthMethods(String);0",
|
||||
"com.trilead.ssh2.Connection;isAuthMethodAvailable(String, String);0",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPublicKey(String, char[], String);0",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPublicKey(String, File, String);0",
|
||||
"com.jcraft.jsch.Session;setPassword(byte[]);0",
|
||||
"com.jcraft.jsch.Session;setPassword(String);0",
|
||||
"ch.ethz.ssh2.Connection;authenticateWithPassword(String, String);1",
|
||||
"org.apache.sshd.client.session.AbstractClientSession;addPasswordIdentity(String);0",
|
||||
"net.schmizz.sshj.SSHClient;authPassword(String, char[]);1",
|
||||
"net.schmizz.sshj.SSHClient;authPassword(String, String);1",
|
||||
"com.sshtools.j2ssh.authentication.PasswordAuthenticationClient;setPassword(String);0",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPassword(String, String);1",
|
||||
"com.trilead.ssh2.Connection;authenticateWithDSA(String, String, String);2",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPublicKey(String, char[], String);2",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPublicKey(String, File, String);2",
|
||||
"com.trilead.ssh2.Connection;authenticateWithDSA(String, String, String);1",
|
||||
"com.trilead.ssh2.Connection;authenticateWithPublicKey(String, char[], String);1",
|
||||
"org.apache.commons.net.ftp.FTPClient;login(String, String);0",
|
||||
"org.apache.commons.net.ftp.FTPClient;login(String, String, String);0",
|
||||
"org.apache.commons.net.ftp.FTPClient;login(String, String);1",
|
||||
"org.apache.commons.net.ftp.FTPClient;login(String, String, String);1",
|
||||
"com.mongodb.MongoCredential;createCredential(String, String, char[]);0",
|
||||
"com.mongodb.MongoCredential;createMongoCRCredential(String, String, char[]);0",
|
||||
"com.mongodb.MongoCredential;createPlainCredential(String, String, char[]);0",
|
||||
"com.mongodb.MongoCredential;createScramSha1Credential(String, String, char[]);0",
|
||||
"com.mongodb.MongoCredential;createGSSAPICredential(String);0",
|
||||
"com.mongodb.MongoCredential;createMongoX509Credential(String);0",
|
||||
"com.mongodb.MongoCredential;createCredential(String, String, char[]);2",
|
||||
"com.mongodb.MongoCredential;createMongoCRCredential(String, String, char[]);2",
|
||||
"com.mongodb.MongoCredential;createPlainCredential(String, String, char[]);2",
|
||||
"com.mongodb.MongoCredential;createScramSha1Credential(String, String, char[]);2"
|
||||
]
|
||||
}
|
||||
@@ -10,55 +10,9 @@
|
||||
* external/cwe/cwe-798
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import HardcodedCredentials
|
||||
import semmle.code.java.security.HardcodedCredentialsApiCallQuery
|
||||
import DataFlow::PathGraph
|
||||
|
||||
class HardcodedCredentialApiCallConfiguration extends DataFlow::Configuration {
|
||||
HardcodedCredentialApiCallConfiguration() { this = "HardcodedCredentialApiCallConfiguration" }
|
||||
|
||||
override predicate isSource(DataFlow::Node n) {
|
||||
n.asExpr() instanceof HardcodedExpr and
|
||||
not n.asExpr().getEnclosingCallable() instanceof ToStringMethod
|
||||
}
|
||||
|
||||
override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof CredentialsApiSink }
|
||||
|
||||
override predicate isAdditionalFlowStep(DataFlow::Node node1, DataFlow::Node node2) {
|
||||
node1.asExpr().getType() instanceof TypeString and
|
||||
(
|
||||
exists(MethodAccess ma | ma.getMethod().hasName(["getBytes", "toCharArray"]) |
|
||||
node2.asExpr() = ma and
|
||||
ma.getQualifier() = node1.asExpr()
|
||||
)
|
||||
or
|
||||
// These base64 routines are usually taint propagators, and this is not a general
|
||||
// TaintTracking::Configuration, so we must specifically include them here
|
||||
// as a common transform applied to a constant before passing to a remote API.
|
||||
exists(MethodAccess ma |
|
||||
ma.getMethod()
|
||||
.hasQualifiedName([
|
||||
"java.util", "cn.hutool.core.codec", "org.apache.shiro.codec",
|
||||
"apache.commons.codec.binary", "org.springframework.util"
|
||||
], ["Base64$Encoder", "Base64$Decoder", "Base64", "Base64Utils"],
|
||||
[
|
||||
"encode", "encodeToString", "decode", "decodeBase64", "encodeBase64",
|
||||
"encodeBase64Chunked", "encodeBase64String", "encodeBase64URLSafe",
|
||||
"encodeBase64URLSafeString"
|
||||
])
|
||||
|
|
||||
node1.asExpr() = ma.getArgument(0) and
|
||||
node2.asExpr() = ma
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override predicate isBarrier(DataFlow::Node n) {
|
||||
n.asExpr().(MethodAccess).getMethod() instanceof MethodSystemGetenv
|
||||
}
|
||||
}
|
||||
|
||||
from
|
||||
DataFlow::PathNode source, DataFlow::PathNode sink, HardcodedCredentialApiCallConfiguration conf
|
||||
where conf.hasFlowPath(source, sink)
|
||||
|
||||
@@ -11,17 +11,8 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import HardcodedCredentials
|
||||
|
||||
class EqualsAccess extends MethodAccess {
|
||||
EqualsAccess() { getMethod() instanceof EqualsMethod }
|
||||
}
|
||||
import semmle.code.java.security.HardcodedCredentialsComparison
|
||||
|
||||
from EqualsAccess sink, HardcodedExpr source, PasswordVariable p
|
||||
where
|
||||
source = sink.getQualifier() and
|
||||
p.getAnAccess() = sink.getArgument(0)
|
||||
or
|
||||
source = sink.getArgument(0) and
|
||||
p.getAnAccess() = sink.getQualifier()
|
||||
where isHardcodedCredentialsComparison(sink, source, p)
|
||||
select source, "Hard-coded value is $@ with password variable $@.", sink, "compared", p, p.getName()
|
||||
|
||||
@@ -11,41 +11,9 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import semmle.code.java.dataflow.DataFlow
|
||||
import semmle.code.java.dataflow.DataFlow2
|
||||
import HardcodedCredentials
|
||||
import semmle.code.java.security.HardcodedCredentialsSourceCallQuery
|
||||
import DataFlow::PathGraph
|
||||
|
||||
class HardcodedCredentialSourceCallConfiguration extends DataFlow::Configuration {
|
||||
HardcodedCredentialSourceCallConfiguration() {
|
||||
this = "HardcodedCredentialSourceCallConfiguration"
|
||||
}
|
||||
|
||||
override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof HardcodedExpr }
|
||||
|
||||
override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof FinalCredentialsSourceSink }
|
||||
}
|
||||
|
||||
class HardcodedCredentialSourceCallConfiguration2 extends DataFlow2::Configuration {
|
||||
HardcodedCredentialSourceCallConfiguration2() {
|
||||
this = "HardcodedCredentialSourceCallConfiguration2"
|
||||
}
|
||||
|
||||
override predicate isSource(DataFlow::Node n) { n.asExpr() instanceof CredentialsSourceSink }
|
||||
|
||||
override predicate isSink(DataFlow::Node n) { n.asExpr() instanceof CredentialsSink }
|
||||
}
|
||||
|
||||
class FinalCredentialsSourceSink extends CredentialsSourceSink {
|
||||
FinalCredentialsSourceSink() {
|
||||
not exists(HardcodedCredentialSourceCallConfiguration2 conf, CredentialsSink other |
|
||||
this != other
|
||||
|
|
||||
conf.hasFlow(DataFlow::exprNode(this), DataFlow::exprNode(other))
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
from
|
||||
DataFlow::PathNode source, DataFlow::PathNode sink,
|
||||
HardcodedCredentialSourceCallConfiguration conf
|
||||
|
||||
@@ -11,11 +11,8 @@
|
||||
*/
|
||||
|
||||
import java
|
||||
import HardcodedCredentials
|
||||
import semmle.code.java.security.HardcodedPasswordField
|
||||
|
||||
from PasswordVariable f, CompileTimeConstantExpr e
|
||||
where
|
||||
f instanceof Field and
|
||||
f.getAnAssignedValue() = e and
|
||||
not e.(StringLiteral).getValue() = ""
|
||||
where passwordFieldAssignedHardcodedValue(f, e)
|
||||
select f, "Sensitive field is assigned a hard-coded $@.", e, "value"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
edges
|
||||
| JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) : String | JSchOSInjectionTest.java:26:48:26:64 | ... + ... |
|
||||
| JSchOSInjectionTest.java:38:30:38:60 | getParameter(...) : String | JSchOSInjectionTest.java:50:32:50:48 | ... + ... |
|
||||
| JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) : String | JSchOSInjectionTest.java:27:52:27:68 | ... + ... |
|
||||
| JSchOSInjectionTest.java:40:30:40:60 | getParameter(...) : String | JSchOSInjectionTest.java:53:36:53:52 | ... + ... |
|
||||
nodes
|
||||
| JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) : String | semmle.label | getParameter(...) : String |
|
||||
| JSchOSInjectionTest.java:26:48:26:64 | ... + ... | semmle.label | ... + ... |
|
||||
| JSchOSInjectionTest.java:38:30:38:60 | getParameter(...) : String | semmle.label | getParameter(...) : String |
|
||||
| JSchOSInjectionTest.java:50:32:50:48 | ... + ... | semmle.label | ... + ... |
|
||||
| JSchOSInjectionTest.java:27:52:27:68 | ... + ... | semmle.label | ... + ... |
|
||||
| JSchOSInjectionTest.java:40:30:40:60 | getParameter(...) : String | semmle.label | getParameter(...) : String |
|
||||
| JSchOSInjectionTest.java:53:36:53:52 | ... + ... | semmle.label | ... + ... |
|
||||
subpaths
|
||||
#select
|
||||
| JSchOSInjectionTest.java:26:48:26:64 | ... + ... | JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) : String | JSchOSInjectionTest.java:26:48:26:64 | ... + ... | $@ flows to here and is used in a command. | JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) | User-provided value |
|
||||
| JSchOSInjectionTest.java:50:32:50:48 | ... + ... | JSchOSInjectionTest.java:38:30:38:60 | getParameter(...) : String | JSchOSInjectionTest.java:50:32:50:48 | ... + ... | $@ flows to here and is used in a command. | JSchOSInjectionTest.java:38:30:38:60 | getParameter(...) | User-provided value |
|
||||
| JSchOSInjectionTest.java:27:52:27:68 | ... + ... | JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) : String | JSchOSInjectionTest.java:27:52:27:68 | ... + ... | $@ flows to here and is used in a command. | JSchOSInjectionTest.java:14:30:14:60 | getParameter(...) | User-provided value |
|
||||
| JSchOSInjectionTest.java:53:36:53:52 | ... + ... | JSchOSInjectionTest.java:40:30:40:60 | getParameter(...) : String | JSchOSInjectionTest.java:53:36:53:52 | ... + ... | $@ flows to here and is used in a command. | JSchOSInjectionTest.java:40:30:40:60 | getParameter(...) | User-provided value |
|
||||
|
||||
@@ -17,17 +17,19 @@ public class JSchOSInjectionTest extends HttpServlet {
|
||||
config.put("StrictHostKeyChecking", "no");
|
||||
|
||||
JSch jsch = new JSch();
|
||||
Session session = jsch.getSession(user, host, 22);
|
||||
session.setPassword(password);
|
||||
session.setConfig(config);
|
||||
session.connect();
|
||||
try {
|
||||
Session session = jsch.getSession(user, host, 22);
|
||||
session.setPassword(password);
|
||||
session.setConfig(config);
|
||||
session.connect();
|
||||
|
||||
Channel channel = session.openChannel("exec");
|
||||
((ChannelExec) channel).setCommand("ping " + command);
|
||||
channel.setInputStream(null);
|
||||
((ChannelExec) channel).setErrStream(System.err);
|
||||
Channel channel = session.openChannel("exec");
|
||||
((ChannelExec) channel).setCommand("ping " + command);
|
||||
channel.setInputStream(null);
|
||||
((ChannelExec) channel).setErrStream(System.err);
|
||||
|
||||
channel.connect();
|
||||
channel.connect();
|
||||
} catch (JSchException e) { }
|
||||
}
|
||||
|
||||
protected void doPost(HttpServletRequest request, HttpServletResponse response)
|
||||
@@ -41,16 +43,18 @@ public class JSchOSInjectionTest extends HttpServlet {
|
||||
config.put("StrictHostKeyChecking", "no");
|
||||
|
||||
JSch jsch = new JSch();
|
||||
Session session = jsch.getSession(user, host, 22);
|
||||
session.setPassword(password);
|
||||
session.setConfig(config);
|
||||
session.connect();
|
||||
try {
|
||||
Session session = jsch.getSession(user, host, 22);
|
||||
session.setPassword(password);
|
||||
session.setConfig(config);
|
||||
session.connect();
|
||||
|
||||
ChannelExec channel = (ChannelExec)session.openChannel("exec");
|
||||
channel.setCommand("ping " + command);
|
||||
channel.setInputStream(null);
|
||||
channel.setErrStream(System.err);
|
||||
ChannelExec channel = (ChannelExec)session.openChannel("exec");
|
||||
channel.setCommand("ping " + command);
|
||||
channel.setInputStream(null);
|
||||
channel.setErrStream(System.err);
|
||||
|
||||
channel.connect();
|
||||
channel.connect();
|
||||
} catch (JSchException e) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../stubs/jsch-0.1.55
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../../stubs/servlet-api-2.4:${testdir}/../../../../stubs/jsch-0.1.55
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ public class CredentialsTest {
|
||||
String url = "jdbc:mysql://localhost/test";
|
||||
String u = "admin"; // hard-coded credential (flow source)
|
||||
|
||||
DriverManager.getConnection(url, u, p); // sensitive call (flow target)
|
||||
DriverManager.getConnection(url, u, p); // $ HardcodedCredentialsApiCall
|
||||
test(url, u, p);
|
||||
}
|
||||
|
||||
public static void test(String url, String v, String q) throws SQLException {
|
||||
DriverManager.getConnection(url, v, q); // sensitive call (flow target)
|
||||
DriverManager.getConnection(url, v, q); // $ HardcodedCredentialsApiCall
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,12 +15,12 @@ public class FileCredentialTest {
|
||||
|
||||
String p = readText(new File(file));
|
||||
|
||||
DriverManager.getConnection("", "admin", p); // sensitive call (flow target)
|
||||
DriverManager.getConnection("", "admin", p); // $ HardcodedCredentialsApiCall
|
||||
test(url, u, p);
|
||||
}
|
||||
|
||||
public static void test(String url, String v, String q) throws SQLException {
|
||||
DriverManager.getConnection(url, v, q); // sensitive call (flow target)
|
||||
DriverManager.getConnection(url, v, q); // $ HardcodedCredentialsApiCall
|
||||
}
|
||||
|
||||
public static String readText(File f) throws IOException
|
||||
|
||||
@@ -4,7 +4,7 @@ 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");
|
||||
//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
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
import org.apache.commons.net.ftp.FTPClient;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class HardcodedApacheFtpCredentials {
|
||||
public static void main(FTPClient client) {
|
||||
// BAD: Hardcoded credentials used for the session username and/or password.
|
||||
try {
|
||||
client.login("username", "password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
client.login("username", "password", "blah"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
} catch(IOException e) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import org.apache.sshd.client.SshClient;
|
||||
import org.apache.sshd.client.session.AbstractClientSession;
|
||||
import java.io.IOException;
|
||||
|
||||
public class HardcodedApacheSshdCredentials {
|
||||
public static void main(SshClient client, AbstractClientSession session) {
|
||||
// BAD: Hardcoded credentials used for the session username and/or password.
|
||||
client.connect("Username", "hostname", 22); // $ HardcodedCredentialsApiCall
|
||||
client.connect("Username", null); // $ HardcodedCredentialsApiCall
|
||||
session.addPasswordIdentity("password"); // $ HardcodedCredentialsApiCall
|
||||
}
|
||||
}
|
||||
@@ -15,8 +15,8 @@ public class HardcodedAzureCredentials {
|
||||
public void testHardcodedUsernamePassword(String input) {
|
||||
UsernamePasswordCredential usernamePasswordCredential = new UsernamePasswordCredentialBuilder()
|
||||
.clientId(clientId)
|
||||
.username(username)
|
||||
.password(clientSecret)
|
||||
.username(username) // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
.password(clientSecret) // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
.build();
|
||||
|
||||
SecretClient client = new SecretClientBuilder()
|
||||
@@ -43,7 +43,7 @@ public class HardcodedAzureCredentials {
|
||||
public void testHardcodedClientSecret(String input) {
|
||||
ClientSecretCredential defaultCredential = new ClientSecretCredentialBuilder()
|
||||
.clientId(clientId)
|
||||
.clientSecret(clientSecret)
|
||||
.clientSecret(clientSecret) // $ HardcodedCredentialsApiCall
|
||||
.tenantId(tenantId)
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
edges
|
||||
| CredentialsTest.java:7:30:7:30 | p : String | CredentialsTest.java:13:39:13:39 | p |
|
||||
| CredentialsTest.java:7:30:7:30 | p : String | CredentialsTest.java:14:16:14:16 | p : String |
|
||||
| CredentialsTest.java:7:34:7:41 | "123456" : String | CredentialsTest.java:7:30:7:30 | p : String |
|
||||
| CredentialsTest.java:11:14:11:20 | "admin" : String | CredentialsTest.java:13:36:13:36 | u |
|
||||
| CredentialsTest.java:11:14:11:20 | "admin" : String | CredentialsTest.java:14:13:14:13 | u : String |
|
||||
| CredentialsTest.java:14:13:14:13 | u : String | CredentialsTest.java:17:38:17:45 | v : String |
|
||||
| CredentialsTest.java:14:16:14:16 | p : String | CredentialsTest.java:17:48:17:55 | q : String |
|
||||
| CredentialsTest.java:17:38:17:45 | v : String | CredentialsTest.java:18:36:18:36 | v |
|
||||
| CredentialsTest.java:17:48:17:55 | q : String | CredentialsTest.java:18:39:18:39 | q |
|
||||
| FileCredentialTest.java:13:14:13:20 | "admin" : String | FileCredentialTest.java:19:13:19:13 | u : String |
|
||||
| FileCredentialTest.java:19:13:19:13 | u : String | FileCredentialTest.java:22:38:22:45 | v : String |
|
||||
| FileCredentialTest.java:22:38:22:45 | v : String | FileCredentialTest.java:23:36:23:36 | v |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String | HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String | HardcodedAzureCredentials.java:63:3:63:33 | new HardcodedAzureCredentials(...) [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [username] : String | HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:2:10:68 | this <.field> [post update] [username] : String | HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" : String | HardcodedAzureCredentials.java:10:2:10:68 | this <.field> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:11:2:11:74 | this <.field> [post update] [clientSecret] : String | HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | HardcodedAzureCredentials.java:11:2:11:74 | this <.field> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [clientSecret] : String | HardcodedAzureCredentials.java:19:13:19:24 | this <.field> [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [username] : String | HardcodedAzureCredentials.java:18:13:18:20 | this <.field> [username] : String |
|
||||
| HardcodedAzureCredentials.java:18:13:18:20 | this <.field> [username] : String | HardcodedAzureCredentials.java:18:13:18:20 | username |
|
||||
| HardcodedAzureCredentials.java:19:13:19:24 | this <.field> [clientSecret] : String | HardcodedAzureCredentials.java:19:13:19:24 | clientSecret |
|
||||
| HardcodedAzureCredentials.java:43:14:43:38 | parameter this [clientSecret] : String | HardcodedAzureCredentials.java:46:17:46:28 | this <.field> [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:46:17:46:28 | this <.field> [clientSecret] : String | HardcodedAzureCredentials.java:46:17:46:28 | clientSecret |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [clientSecret] : String | HardcodedAzureCredentials.java:15:14:15:42 | parameter this [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [username] : String | HardcodedAzureCredentials.java:15:14:15:42 | parameter this [username] : String |
|
||||
| HardcodedAzureCredentials.java:63:3:63:33 | new HardcodedAzureCredentials(...) [clientSecret] : String | HardcodedAzureCredentials.java:43:14:43:38 | parameter this [clientSecret] : String |
|
||||
| HardcodedShiroKey.java:9:46:9:54 | "TEST123" : String | HardcodedShiroKey.java:9:46:9:65 | getBytes(...) |
|
||||
| HardcodedShiroKey.java:18:61:18:86 | "4AvVhmFLUs0KTA3Kprsdag==" : String | HardcodedShiroKey.java:18:46:18:87 | decode(...) |
|
||||
| HardcodedShiroKey.java:26:83:26:108 | "6ZmI6I2j5Y+R5aSn5ZOlAA==" : String | HardcodedShiroKey.java:26:46:26:109 | decode(...) |
|
||||
| Test.java:9:16:9:22 | "admin" : String | Test.java:12:13:12:15 | usr : String |
|
||||
| Test.java:9:16:9:22 | "admin" : String | Test.java:15:36:15:38 | usr |
|
||||
| Test.java:9:16:9:22 | "admin" : String | Test.java:17:39:17:41 | usr |
|
||||
| Test.java:9:16:9:22 | "admin" : String | Test.java:18:39:18:41 | usr |
|
||||
| Test.java:10:17:10:24 | "123456" : String | Test.java:12:18:12:21 | pass : String |
|
||||
| Test.java:10:17:10:24 | "123456" : String | Test.java:15:41:15:44 | pass |
|
||||
| Test.java:10:17:10:24 | "123456" : String | Test.java:18:44:18:61 | toCharArray(...) |
|
||||
| Test.java:12:13:12:15 | usr : String | Test.java:29:38:29:48 | user : String |
|
||||
| Test.java:12:18:12:21 | pass : String | Test.java:29:51:29:65 | password : String |
|
||||
| Test.java:17:44:17:51 | "123456" : String | Test.java:17:44:17:65 | toCharArray(...) |
|
||||
| Test.java:20:16:20:39 | new byte[] : byte[] | Test.java:21:78:21:80 | key |
|
||||
| Test.java:23:17:23:26 | "abcdefgh" : String | Test.java:24:79:24:82 | key2 |
|
||||
| Test.java:29:38:29:48 | user : String | Test.java:30:36:30:39 | user |
|
||||
| Test.java:29:51:29:65 | password : String | Test.java:30:42:30:49 | password |
|
||||
nodes
|
||||
| CredentialsTest.java:7:30:7:30 | p : String | semmle.label | p : String |
|
||||
| CredentialsTest.java:7:34:7:41 | "123456" : String | semmle.label | "123456" : String |
|
||||
| CredentialsTest.java:11:14:11:20 | "admin" : String | semmle.label | "admin" : String |
|
||||
| CredentialsTest.java:13:36:13:36 | u | semmle.label | u |
|
||||
| CredentialsTest.java:13:39:13:39 | p | semmle.label | p |
|
||||
| CredentialsTest.java:14:13:14:13 | u : String | semmle.label | u : String |
|
||||
| CredentialsTest.java:14:16:14:16 | p : String | semmle.label | p : String |
|
||||
| CredentialsTest.java:17:38:17:45 | v : String | semmle.label | v : String |
|
||||
| CredentialsTest.java:17:48:17:55 | q : String | semmle.label | q : String |
|
||||
| CredentialsTest.java:18:36:18:36 | v | semmle.label | v |
|
||||
| CredentialsTest.java:18:39:18:39 | q | semmle.label | q |
|
||||
| FileCredentialTest.java:13:14:13:20 | "admin" : String | semmle.label | "admin" : String |
|
||||
| FileCredentialTest.java:18:35:18:41 | "admin" | semmle.label | "admin" |
|
||||
| FileCredentialTest.java:19:13:19:13 | u : String | semmle.label | u : String |
|
||||
| FileCredentialTest.java:22:38:22:45 | v : String | semmle.label | v : String |
|
||||
| FileCredentialTest.java:23:36:23:36 | v | semmle.label | v |
|
||||
| HardcodedAWSCredentials.java:8:50:8:61 | "ACCESS_KEY" | semmle.label | "ACCESS_KEY" |
|
||||
| HardcodedAWSCredentials.java:8:64:8:75 | "SECRET_KEY" | semmle.label | "SECRET_KEY" |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String | semmle.label | this <.method> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [username] : String | semmle.label | this <.method> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:2:10:68 | this <.field> [post update] [username] : String | semmle.label | this <.field> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" : String | semmle.label | "username@example.onmicrosoft.com" : String |
|
||||
| HardcodedAzureCredentials.java:11:2:11:74 | this <.field> [post update] [clientSecret] : String | semmle.label | this <.field> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | semmle.label | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [clientSecret] : String | semmle.label | parameter this [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [username] : String | semmle.label | parameter this [username] : String |
|
||||
| HardcodedAzureCredentials.java:18:13:18:20 | this <.field> [username] : String | semmle.label | this <.field> [username] : String |
|
||||
| HardcodedAzureCredentials.java:18:13:18:20 | username | semmle.label | username |
|
||||
| HardcodedAzureCredentials.java:19:13:19:24 | clientSecret | semmle.label | clientSecret |
|
||||
| HardcodedAzureCredentials.java:19:13:19:24 | this <.field> [clientSecret] : String | semmle.label | this <.field> [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:43:14:43:38 | parameter this [clientSecret] : String | semmle.label | parameter this [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:46:17:46:28 | clientSecret | semmle.label | clientSecret |
|
||||
| HardcodedAzureCredentials.java:46:17:46:28 | this <.field> [clientSecret] : String | semmle.label | this <.field> [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [clientSecret] : String | semmle.label | new HardcodedAzureCredentials(...) [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [username] : String | semmle.label | new HardcodedAzureCredentials(...) [username] : String |
|
||||
| HardcodedAzureCredentials.java:63:3:63:33 | new HardcodedAzureCredentials(...) [clientSecret] : String | semmle.label | new HardcodedAzureCredentials(...) [clientSecret] : String |
|
||||
| HardcodedShiroKey.java:9:46:9:54 | "TEST123" : String | semmle.label | "TEST123" : String |
|
||||
| HardcodedShiroKey.java:9:46:9:65 | getBytes(...) | semmle.label | getBytes(...) |
|
||||
| HardcodedShiroKey.java:18:46:18:87 | decode(...) | semmle.label | decode(...) |
|
||||
| HardcodedShiroKey.java:18:61:18:86 | "4AvVhmFLUs0KTA3Kprsdag==" : String | semmle.label | "4AvVhmFLUs0KTA3Kprsdag==" : String |
|
||||
| HardcodedShiroKey.java:26:46:26:109 | decode(...) | semmle.label | decode(...) |
|
||||
| HardcodedShiroKey.java:26:83:26:108 | "6ZmI6I2j5Y+R5aSn5ZOlAA==" : String | semmle.label | "6ZmI6I2j5Y+R5aSn5ZOlAA==" : String |
|
||||
| Test.java:9:16:9:22 | "admin" : String | semmle.label | "admin" : String |
|
||||
| Test.java:10:17:10:24 | "123456" : String | semmle.label | "123456" : String |
|
||||
| Test.java:12:13:12:15 | usr : String | semmle.label | usr : String |
|
||||
| Test.java:12:18:12:21 | pass : String | semmle.label | pass : String |
|
||||
| Test.java:14:36:14:42 | "admin" | semmle.label | "admin" |
|
||||
| Test.java:14:45:14:52 | "123456" | semmle.label | "123456" |
|
||||
| Test.java:15:36:15:38 | usr | semmle.label | usr |
|
||||
| Test.java:15:41:15:44 | pass | semmle.label | pass |
|
||||
| Test.java:17:39:17:41 | usr | semmle.label | usr |
|
||||
| Test.java:17:44:17:51 | "123456" : String | semmle.label | "123456" : String |
|
||||
| Test.java:17:44:17:65 | toCharArray(...) | semmle.label | toCharArray(...) |
|
||||
| Test.java:18:39:18:41 | usr | semmle.label | usr |
|
||||
| Test.java:18:44:18:61 | toCharArray(...) | semmle.label | toCharArray(...) |
|
||||
| Test.java:20:16:20:39 | new byte[] : byte[] | semmle.label | new byte[] : byte[] |
|
||||
| Test.java:21:78:21:80 | key | semmle.label | key |
|
||||
| Test.java:23:17:23:26 | "abcdefgh" : String | semmle.label | "abcdefgh" : String |
|
||||
| Test.java:24:79:24:82 | key2 | semmle.label | key2 |
|
||||
| Test.java:29:38:29:48 | user : String | semmle.label | user : String |
|
||||
| Test.java:29:51:29:65 | password : String | semmle.label | password : String |
|
||||
| Test.java:30:36:30:39 | user | semmle.label | user |
|
||||
| Test.java:30:42:30:49 | password | semmle.label | password |
|
||||
subpaths
|
||||
#select
|
||||
| CredentialsTest.java:7:34:7:41 | "123456" | CredentialsTest.java:7:34:7:41 | "123456" : String | CredentialsTest.java:13:39:13:39 | p | Hard-coded value flows to $@. | CredentialsTest.java:13:39:13:39 | p | sensitive API call |
|
||||
| CredentialsTest.java:7:34:7:41 | "123456" | CredentialsTest.java:7:34:7:41 | "123456" : String | CredentialsTest.java:18:39:18:39 | q | Hard-coded value flows to $@. | CredentialsTest.java:18:39:18:39 | q | sensitive API call |
|
||||
| CredentialsTest.java:11:14:11:20 | "admin" | CredentialsTest.java:11:14:11:20 | "admin" : String | CredentialsTest.java:13:36:13:36 | u | Hard-coded value flows to $@. | CredentialsTest.java:13:36:13:36 | u | sensitive API call |
|
||||
| CredentialsTest.java:11:14:11:20 | "admin" | CredentialsTest.java:11:14:11:20 | "admin" : String | CredentialsTest.java:18:36:18:36 | v | Hard-coded value flows to $@. | CredentialsTest.java:18:36:18:36 | v | sensitive API call |
|
||||
| FileCredentialTest.java:13:14:13:20 | "admin" | FileCredentialTest.java:13:14:13:20 | "admin" : String | FileCredentialTest.java:23:36:23:36 | v | Hard-coded value flows to $@. | FileCredentialTest.java:23:36:23:36 | v | sensitive API call |
|
||||
| FileCredentialTest.java:18:35:18:41 | "admin" | FileCredentialTest.java:18:35:18:41 | "admin" | FileCredentialTest.java:18:35:18:41 | "admin" | Hard-coded value flows to $@. | FileCredentialTest.java:18:35:18:41 | "admin" | sensitive API call |
|
||||
| HardcodedAWSCredentials.java:8:50:8:61 | "ACCESS_KEY" | HardcodedAWSCredentials.java:8:50:8:61 | "ACCESS_KEY" | HardcodedAWSCredentials.java:8:50:8:61 | "ACCESS_KEY" | Hard-coded value flows to $@. | HardcodedAWSCredentials.java:8:50:8:61 | "ACCESS_KEY" | sensitive API call |
|
||||
| HardcodedAWSCredentials.java:8:64:8:75 | "SECRET_KEY" | HardcodedAWSCredentials.java:8:64:8:75 | "SECRET_KEY" | HardcodedAWSCredentials.java:8:64:8:75 | "SECRET_KEY" | Hard-coded value flows to $@. | HardcodedAWSCredentials.java:8:64:8:75 | "SECRET_KEY" | sensitive API call |
|
||||
| HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" | HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" : String | HardcodedAzureCredentials.java:18:13:18:20 | username | Hard-coded value flows to $@. | HardcodedAzureCredentials.java:18:13:18:20 | username | sensitive API call |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" | HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | HardcodedAzureCredentials.java:19:13:19:24 | clientSecret | Hard-coded value flows to $@. | HardcodedAzureCredentials.java:19:13:19:24 | clientSecret | sensitive API call |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" | HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | HardcodedAzureCredentials.java:46:17:46:28 | clientSecret | Hard-coded value flows to $@. | HardcodedAzureCredentials.java:46:17:46:28 | clientSecret | sensitive API call |
|
||||
| HardcodedShiroKey.java:9:46:9:54 | "TEST123" | HardcodedShiroKey.java:9:46:9:54 | "TEST123" : String | HardcodedShiroKey.java:9:46:9:65 | getBytes(...) | Hard-coded value flows to $@. | HardcodedShiroKey.java:9:46:9:65 | getBytes(...) | sensitive API call |
|
||||
| HardcodedShiroKey.java:18:61:18:86 | "4AvVhmFLUs0KTA3Kprsdag==" | HardcodedShiroKey.java:18:61:18:86 | "4AvVhmFLUs0KTA3Kprsdag==" : String | HardcodedShiroKey.java:18:46:18:87 | decode(...) | Hard-coded value flows to $@. | HardcodedShiroKey.java:18:46:18:87 | decode(...) | sensitive API call |
|
||||
| HardcodedShiroKey.java:26:83:26:108 | "6ZmI6I2j5Y+R5aSn5ZOlAA==" | HardcodedShiroKey.java:26:83:26:108 | "6ZmI6I2j5Y+R5aSn5ZOlAA==" : String | HardcodedShiroKey.java:26:46:26:109 | decode(...) | Hard-coded value flows to $@. | HardcodedShiroKey.java:26:46:26:109 | decode(...) | sensitive API call |
|
||||
| Test.java:9:16:9:22 | "admin" | Test.java:9:16:9:22 | "admin" : String | Test.java:15:36:15:38 | usr | Hard-coded value flows to $@. | Test.java:15:36:15:38 | usr | sensitive API call |
|
||||
| Test.java:9:16:9:22 | "admin" | Test.java:9:16:9:22 | "admin" : String | Test.java:17:39:17:41 | usr | Hard-coded value flows to $@. | Test.java:17:39:17:41 | usr | sensitive API call |
|
||||
| Test.java:9:16:9:22 | "admin" | Test.java:9:16:9:22 | "admin" : String | Test.java:18:39:18:41 | usr | Hard-coded value flows to $@. | Test.java:18:39:18:41 | usr | sensitive API call |
|
||||
| Test.java:9:16:9:22 | "admin" | Test.java:9:16:9:22 | "admin" : String | Test.java:30:36:30:39 | user | Hard-coded value flows to $@. | Test.java:30:36:30:39 | user | sensitive API call |
|
||||
| Test.java:10:17:10:24 | "123456" | Test.java:10:17:10:24 | "123456" : String | Test.java:15:41:15:44 | pass | Hard-coded value flows to $@. | Test.java:15:41:15:44 | pass | sensitive API call |
|
||||
| Test.java:10:17:10:24 | "123456" | Test.java:10:17:10:24 | "123456" : String | Test.java:18:44:18:61 | toCharArray(...) | Hard-coded value flows to $@. | Test.java:18:44:18:61 | toCharArray(...) | sensitive API call |
|
||||
| Test.java:10:17:10:24 | "123456" | Test.java:10:17:10:24 | "123456" : String | Test.java:30:42:30:49 | password | Hard-coded value flows to $@. | Test.java:30:42:30:49 | password | sensitive API call |
|
||||
| Test.java:14:36:14:42 | "admin" | Test.java:14:36:14:42 | "admin" | Test.java:14:36:14:42 | "admin" | Hard-coded value flows to $@. | Test.java:14:36:14:42 | "admin" | sensitive API call |
|
||||
| Test.java:14:45:14:52 | "123456" | Test.java:14:45:14:52 | "123456" | Test.java:14:45:14:52 | "123456" | Hard-coded value flows to $@. | Test.java:14:45:14:52 | "123456" | sensitive API call |
|
||||
| Test.java:17:44:17:51 | "123456" | Test.java:17:44:17:51 | "123456" : String | Test.java:17:44:17:65 | toCharArray(...) | Hard-coded value flows to $@. | Test.java:17:44:17:65 | toCharArray(...) | sensitive API call |
|
||||
| Test.java:20:16:20:39 | new byte[] | Test.java:20:16:20:39 | new byte[] : byte[] | Test.java:21:78:21:80 | key | Hard-coded value flows to $@. | Test.java:21:78:21:80 | key | sensitive API call |
|
||||
| Test.java:23:17:23:26 | "abcdefgh" | Test.java:23:17:23:26 | "abcdefgh" : String | Test.java:24:79:24:82 | key2 | Hard-coded value flows to $@. | Test.java:24:79:24:82 | key2 | sensitive API call |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import java
|
||||
import semmle.code.java.security.HardcodedCredentialsApiCallQuery
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class HardcodedCredentialsApiCallTest extends InlineExpectationsTest {
|
||||
HardcodedCredentialsApiCallTest() { this = "HardcodedCredentialsApiCallTest" }
|
||||
|
||||
override string getARelevantTag() { result = "HardcodedCredentialsApiCall" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "HardcodedCredentialsApiCall" and
|
||||
exists(DataFlow::Node sink, HardcodedCredentialApiCallConfiguration conf |
|
||||
conf.hasFlow(_, sink)
|
||||
|
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql
|
||||
@@ -1 +0,0 @@
|
||||
| Test.java:36:26:36:32 | "admin" | Hard-coded value is $@ with password variable $@. | Test.java:36:10:36:33 | equals(...) | compared | Test.java:35:38:35:52 | password | password |
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import java
|
||||
import semmle.code.java.security.HardcodedCredentialsComparison
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class HardcodedCredentialsComparisonTest extends InlineExpectationsTest {
|
||||
HardcodedCredentialsComparisonTest() { this = "HardcodedCredentialsComparisonTest" }
|
||||
|
||||
override string getARelevantTag() { result = "HardcodedCredentialsComparison" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "HardcodedCredentialsComparison" and
|
||||
exists(Expr sink | isHardcodedCredentialsComparison(sink, _, _) |
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE/CWE-798/HardcodedCredentialsComparison.ql
|
||||
@@ -1,42 +0,0 @@
|
||||
edges
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String | HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [username] : String | HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:2:10:68 | this <.field> [post update] [username] : String | HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" : String | HardcodedAzureCredentials.java:10:2:10:68 | this <.field> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:11:2:11:74 | this <.field> [post update] [clientSecret] : String | HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | HardcodedAzureCredentials.java:11:2:11:74 | this <.field> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [clientSecret] : String | HardcodedAzureCredentials.java:19:13:19:24 | this <.field> [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [username] : String | HardcodedAzureCredentials.java:18:13:18:20 | this <.field> [username] : String |
|
||||
| HardcodedAzureCredentials.java:18:13:18:20 | this <.field> [username] : String | HardcodedAzureCredentials.java:18:13:18:20 | username |
|
||||
| HardcodedAzureCredentials.java:19:13:19:24 | this <.field> [clientSecret] : String | HardcodedAzureCredentials.java:19:13:19:24 | clientSecret |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [clientSecret] : String | HardcodedAzureCredentials.java:15:14:15:42 | parameter this [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [username] : String | HardcodedAzureCredentials.java:15:14:15:42 | parameter this [username] : String |
|
||||
| Test.java:10:17:10:24 | "123456" : String | Test.java:26:17:26:20 | pass |
|
||||
| User.java:2:30:2:39 | DEFAULT_PW : String | User.java:5:15:5:24 | DEFAULT_PW |
|
||||
| User.java:2:43:2:50 | "123456" : String | User.java:2:30:2:39 | DEFAULT_PW : String |
|
||||
nodes
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [clientSecret] : String | semmle.label | this <.method> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:8:14:8:38 | this <.method> [post update] [username] : String | semmle.label | this <.method> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:2:10:68 | this <.field> [post update] [username] : String | semmle.label | this <.field> [post update] [username] : String |
|
||||
| HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" : String | semmle.label | "username@example.onmicrosoft.com" : String |
|
||||
| HardcodedAzureCredentials.java:11:2:11:74 | this <.field> [post update] [clientSecret] : String | semmle.label | this <.field> [post update] [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | semmle.label | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [clientSecret] : String | semmle.label | parameter this [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:15:14:15:42 | parameter this [username] : String | semmle.label | parameter this [username] : String |
|
||||
| HardcodedAzureCredentials.java:18:13:18:20 | this <.field> [username] : String | semmle.label | this <.field> [username] : String |
|
||||
| HardcodedAzureCredentials.java:18:13:18:20 | username | semmle.label | username |
|
||||
| HardcodedAzureCredentials.java:19:13:19:24 | clientSecret | semmle.label | clientSecret |
|
||||
| HardcodedAzureCredentials.java:19:13:19:24 | this <.field> [clientSecret] : String | semmle.label | this <.field> [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [clientSecret] : String | semmle.label | new HardcodedAzureCredentials(...) [clientSecret] : String |
|
||||
| HardcodedAzureCredentials.java:61:3:61:33 | new HardcodedAzureCredentials(...) [username] : String | semmle.label | new HardcodedAzureCredentials(...) [username] : String |
|
||||
| Test.java:10:17:10:24 | "123456" : String | semmle.label | "123456" : String |
|
||||
| Test.java:26:17:26:20 | pass | semmle.label | pass |
|
||||
| User.java:2:30:2:39 | DEFAULT_PW : String | semmle.label | DEFAULT_PW : String |
|
||||
| User.java:2:43:2:50 | "123456" : String | semmle.label | "123456" : String |
|
||||
| User.java:5:15:5:24 | DEFAULT_PW | semmle.label | DEFAULT_PW |
|
||||
subpaths
|
||||
#select
|
||||
| HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" | HardcodedAzureCredentials.java:10:34:10:67 | "username@example.onmicrosoft.com" : String | HardcodedAzureCredentials.java:18:13:18:20 | username | Hard-coded value flows to $@. | HardcodedAzureCredentials.java:18:13:18:20 | username | sensitive call |
|
||||
| HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" | HardcodedAzureCredentials.java:11:38:11:73 | "1n1.qAc~3Q-1t38aF79Xzv5AUEfR5-ct3_" : String | HardcodedAzureCredentials.java:19:13:19:24 | clientSecret | Hard-coded value flows to $@. | HardcodedAzureCredentials.java:19:13:19:24 | clientSecret | sensitive call |
|
||||
| Test.java:10:17:10:24 | "123456" | Test.java:10:17:10:24 | "123456" : String | Test.java:26:17:26:20 | pass | Hard-coded value flows to $@. | Test.java:26:17:26:20 | pass | sensitive call |
|
||||
| User.java:2:43:2:50 | "123456" | User.java:2:43:2:50 | "123456" : String | User.java:5:15:5:24 | DEFAULT_PW | Hard-coded value flows to $@. | User.java:5:15:5:24 | DEFAULT_PW | sensitive call |
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import java
|
||||
import semmle.code.java.security.HardcodedCredentialsSourceCallQuery
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class HardcodedCredentialsSourceCallTest extends InlineExpectationsTest {
|
||||
HardcodedCredentialsSourceCallTest() { this = "HardcodedCredentialsSourceCallTest" }
|
||||
|
||||
override string getARelevantTag() { result = "HardcodedCredentialsSourceCall" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "HardcodedCredentialsSourceCall" and
|
||||
exists(DataFlow::Node sink, HardcodedCredentialSourceCallConfiguration conf |
|
||||
conf.hasFlow(_, sink)
|
||||
|
|
||||
sink.getLocation() = location and
|
||||
element = sink.toString() and
|
||||
value = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE/CWE-798/HardcodedCredentialsSourceCall.ql
|
||||
@@ -0,0 +1,11 @@
|
||||
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) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
import com.sshtools.j2ssh.authentication.SshAuthenticationClient;
|
||||
import com.sshtools.j2ssh.authentication.PasswordAuthenticationClient;
|
||||
|
||||
public class HardcodedJ2sshCredentials {
|
||||
public static void main(SshAuthenticationClient client1, PasswordAuthenticationClient client2) {
|
||||
// BAD: Hardcoded credentials used for the session username and/or password.
|
||||
client1.setUsername("Username"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
client2.setUsername("Username"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
client2.setPassword("password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import com.jcraft.jsch.JSch;
|
||||
import com.jcraft.jsch.JSchException;
|
||||
import com.jcraft.jsch.Session;
|
||||
import java.io.IOException;
|
||||
|
||||
public class HardcodedJschCredentials {
|
||||
public static void main(JSch jsch) {
|
||||
// BAD: Hardcoded credentials used for the session username and/or password.
|
||||
try {
|
||||
Session session = jsch.getSession("Username", "hostname"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
Session session2 = jsch.getSession("Username", "hostname", 22); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
session.setPassword("password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
session2.setPassword("password".getBytes()); // $ HardcodedCredentialsApiCall
|
||||
} catch(JSchException e) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
import com.mongodb.MongoCredential;
|
||||
|
||||
public class HardcodedMongoCredentials {
|
||||
public static void test() {
|
||||
MongoCredential.createCredential("Username", "blah", "password".toCharArray()); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
MongoCredential.createMongoCRCredential("Username", "blah", "password".toCharArray()); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
MongoCredential.createPlainCredential("Username", "blah", "password".toCharArray()); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
MongoCredential.createScramSha1Credential("Username", "blah", "password".toCharArray()); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
MongoCredential.createGSSAPICredential("key"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
MongoCredential.createMongoX509Credential("key"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
| Test.java:33:29:33:36 | password | Sensitive field is assigned a hard-coded $@. | Test.java:33:40:33:56 | "myOtherPassword" | value |
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
import java
|
||||
import semmle.code.java.security.HardcodedPasswordField
|
||||
import TestUtilities.InlineExpectationsTest
|
||||
|
||||
class HardcodedPasswordFieldTest extends InlineExpectationsTest {
|
||||
HardcodedPasswordFieldTest() { this = "HardcodedPasswordFieldTest" }
|
||||
|
||||
override string getARelevantTag() { result = "HardcodedPasswordField" }
|
||||
|
||||
override predicate hasActualResult(Location location, string element, string tag, string value) {
|
||||
tag = "HardcodedPasswordField" and
|
||||
exists(Expr assigned | passwordFieldAssignedHardcodedValue(_, assigned) |
|
||||
assigned.getLocation() = location and
|
||||
element = assigned.toString() and
|
||||
value = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
Security/CWE/CWE-798/HardcodedPasswordField.ql
|
||||
@@ -6,16 +6,16 @@ public class HardcodedShiroKey {
|
||||
//BAD: hard-coded shiro key
|
||||
public void testHardcodedShiroKey(String input) {
|
||||
CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
|
||||
cookieRememberMeManager.setCipherKey("TEST123".getBytes());
|
||||
cookieRememberMeManager.setCipherKey("TEST123".getBytes()); // $ HardcodedCredentialsApiCall
|
||||
|
||||
}
|
||||
|
||||
|
||||
//BAD: hard-coded shiro key encoded by java.util.Base64
|
||||
//BAD: hard-coded shiro key encoded by java.util.Base64
|
||||
public void testHardcodedbase64ShiroKey1(String input) {
|
||||
CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
|
||||
java.util.Base64.Decoder decoder = java.util.Base64.getDecoder();
|
||||
cookieRememberMeManager.setCipherKey(decoder.decode("4AvVhmFLUs0KTA3Kprsdag=="));
|
||||
cookieRememberMeManager.setCipherKey(decoder.decode("4AvVhmFLUs0KTA3Kprsdag==")); // $ HardcodedCredentialsApiCall
|
||||
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ public class HardcodedShiroKey {
|
||||
//BAD: hard-coded shiro key encoded by org.apache.shiro.codec.Base64
|
||||
public void testHardcodedbase64ShiroKey2(String input) {
|
||||
CookieRememberMeManager cookieRememberMeManager = new CookieRememberMeManager();
|
||||
cookieRememberMeManager.setCipherKey(org.apache.shiro.codec.Base64.decode("6ZmI6I2j5Y+R5aSn5ZOlAA=="));
|
||||
cookieRememberMeManager.setCipherKey(org.apache.shiro.codec.Base64.decode("6ZmI6I2j5Y+R5aSn5ZOlAA==")); // $ HardcodedCredentialsApiCall
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import net.schmizz.sshj.SSHClient;
|
||||
import java.io.IOException;
|
||||
|
||||
public class HardcodedSshjCredentials {
|
||||
public static void main(SSHClient client) {
|
||||
// BAD: Hardcoded credentials used for the session username and/or password.
|
||||
try {
|
||||
client.authPassword("Username", "password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
client.authPassword("Username", "password".toCharArray()); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
}
|
||||
catch(IOException e) { }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import com.trilead.ssh2.Connection;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.File;
|
||||
|
||||
public class HardcodedTrileadSshCredentials {
|
||||
public static void main(Connection conn) {
|
||||
// BAD: Hardcoded credentials used for the session username and/or password.
|
||||
try {
|
||||
conn.authenticateWithPassword("Username", "password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
conn.authenticateWithDSA("Username", "password", "key"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
conn.authenticateWithNone("Username"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
conn.getRemainingAuthMethods("Username"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
conn.isAuthMethodAvailable("Username", "method"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
conn.authenticateWithPublicKey("Username", "key".toCharArray(), "password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
conn.authenticateWithPublicKey("Username", (File)null, "password"); // $ HardcodedCredentialsApiCall $ HardcodedCredentialsSourceCall
|
||||
} catch(IOException e) { }
|
||||
}
|
||||
}
|
||||
@@ -11,28 +11,28 @@ public class Test {
|
||||
|
||||
test(url, usr, pass); // flow through method
|
||||
|
||||
DriverManager.getConnection(url, "admin", "123456"); // hard-coded user/pass used directly in call
|
||||
DriverManager.getConnection(url, usr, pass); // hard-coded user/pass flows into API call
|
||||
DriverManager.getConnection(url, "admin", "123456"); // $ HardcodedCredentialsApiCall
|
||||
DriverManager.getConnection(url, usr, pass); // $ HardcodedCredentialsApiCall
|
||||
|
||||
new java.net.PasswordAuthentication(usr, "123456".toCharArray()); // flow into char[] array
|
||||
new java.net.PasswordAuthentication(usr, pass.toCharArray()); // flow through variable, then char[] array
|
||||
new java.net.PasswordAuthentication(usr, "123456".toCharArray()); // $ HardcodedCredentialsApiCall
|
||||
new java.net.PasswordAuthentication(usr, pass.toCharArray()); // $ HardcodedCredentialsApiCall
|
||||
|
||||
byte[] key = {1, 2, 3, 4, 5, 6, 7, 8}; // hard-coded cryptographic key, flowing into API call below
|
||||
javax.crypto.spec.SecretKeySpec spec = new javax.crypto.spec.SecretKeySpec(key, "AES");
|
||||
javax.crypto.spec.SecretKeySpec spec = new javax.crypto.spec.SecretKeySpec(key, "AES"); // $ HardcodedCredentialsApiCall
|
||||
|
||||
byte[] key2 = "abcdefgh".getBytes(); // hard-coded cryptographic key, flowing into API call below
|
||||
javax.crypto.spec.SecretKeySpec spec2 = new javax.crypto.spec.SecretKeySpec(key2, "AES");
|
||||
javax.crypto.spec.SecretKeySpec spec2 = new javax.crypto.spec.SecretKeySpec(key2, "AES"); // $ HardcodedCredentialsApiCall
|
||||
|
||||
passwordCheck(pass); // flow through
|
||||
passwordCheck(pass); // $ HardcodedCredentialsSourceCall
|
||||
}
|
||||
|
||||
public static void test(String url, String user, String password) throws SQLException {
|
||||
DriverManager.getConnection(url, user, password); // sensitive API call (flow target)
|
||||
DriverManager.getConnection(url, user, password); // $ HardcodedCredentialsApiCall
|
||||
}
|
||||
|
||||
public static final String password = "myOtherPassword"; // hard-coded password
|
||||
public static final String password = "myOtherPassword"; // $ HardcodedPasswordField
|
||||
|
||||
public static boolean passwordCheck(String password) {
|
||||
return password.equals("admin"); // hard-coded password comparison
|
||||
return password.equals("admin"); // $ HardcodedCredentialsComparison
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ class User {
|
||||
private static final String DEFAULT_PW = "123456"; // hard-coded password
|
||||
private String pw;
|
||||
public User() {
|
||||
setPassword(DEFAULT_PW); // sensitive call
|
||||
setPassword(DEFAULT_PW); // $ HardcodedCredentialsSourceCall
|
||||
}
|
||||
public void setPassword(String password) {
|
||||
pw = password;
|
||||
|
||||
@@ -1 +1 @@
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/amazon-aws-sdk-1.11.700:${testdir}/../../../../../stubs/azure-sdk-for-java:${testdir}/../../../../../stubs/shiro-core-1.4.0
|
||||
// semmle-extractor-options: --javac-args -cp ${testdir}/../../../../../stubs/amazon-aws-sdk-1.11.700:${testdir}/../../../../../stubs/azure-sdk-for-java:${testdir}/../../../../../stubs/shiro-core-1.4.0:${testdir}/../../../../../stubs/jsch-0.1.55:${testdir}/../../../../../stubs/ganymed-ssh-2-260:${testdir}/../../../../../stubs/apache-mina-sshd-2.8.0:${testdir}/../../../../../stubs/sshj-0.33.0:${testdir}/../../../../../stubs/j2ssh-1.5.5:${testdir}/../../../../../stubs/trilead-ssh2-212:${testdir}/../../../../../stubs/apache-commons-net-3.8.0:${testdir}/../../../../../stubs/mongodbClient
|
||||
|
||||
22
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/SocketClient.java
generated
Normal file
22
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/SocketClient.java
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.net;
|
||||
|
||||
public abstract class SocketClient
|
||||
{
|
||||
}
|
||||
22
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/ftp/Configurable.java
generated
Normal file
22
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/ftp/Configurable.java
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.net.ftp;
|
||||
|
||||
public interface Configurable {
|
||||
|
||||
}
|
||||
24
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/ftp/FTP.java
generated
Normal file
24
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/ftp/FTP.java
generated
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.apache.commons.net.ftp;
|
||||
|
||||
import org.apache.commons.net.SocketClient;
|
||||
|
||||
public class FTP extends SocketClient
|
||||
{
|
||||
}
|
||||
33
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/ftp/FTPClient.java
generated
Normal file
33
java/ql/test/stubs/apache-commons-net-3.8.0/org/apache/commons/net/ftp/FTPClient.java
generated
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
* contributor license agreements. See the NOTICE file distributed with
|
||||
* this work for additional information regarding copyright ownership.
|
||||
* The ASF licenses this file to You under the Apache License, Version 2.0
|
||||
* (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package org.apache.commons.net.ftp;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class FTPClient extends FTP implements Configurable {
|
||||
|
||||
public boolean login(final String username, final String password) throws IOException
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean login(final String username, final String password, final String account) throws IOException
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
21
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgent.java
generated
Normal file
21
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgent.java
generated
Normal file
@@ -0,0 +1,21 @@
|
||||
// Generated automatically from org.apache.sshd.agent.SshAgent for testing purposes
|
||||
|
||||
package org.apache.sshd.agent;
|
||||
|
||||
import java.nio.channels.Channel;
|
||||
import java.security.KeyPair;
|
||||
import java.security.PublicKey;
|
||||
import java.util.Map;
|
||||
import org.apache.sshd.agent.SshAgentKeyConstraint;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
|
||||
public interface SshAgent extends Channel
|
||||
{
|
||||
Iterable<? extends Map.Entry<PublicKey, String>> getIdentities();
|
||||
Map.Entry<String, byte[]> sign(SessionContext p0, PublicKey p1, String p2, byte[] p3);
|
||||
default KeyPair resolveLocalIdentity(PublicKey p0){ return null; }
|
||||
static String SSH_AUTHSOCKET_ENV_NAME = null;
|
||||
void addIdentity(KeyPair p0, String p1, SshAgentKeyConstraint... p2);
|
||||
void removeAllIdentities();
|
||||
void removeIdentity(PublicKey p0);
|
||||
}
|
||||
18
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgentFactory.java
generated
Normal file
18
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgentFactory.java
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.apache.sshd.agent.SshAgentFactory for testing purposes
|
||||
|
||||
package org.apache.sshd.agent;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.sshd.agent.SshAgent;
|
||||
import org.apache.sshd.agent.SshAgentServer;
|
||||
import org.apache.sshd.common.FactoryManager;
|
||||
import org.apache.sshd.common.channel.ChannelFactory;
|
||||
import org.apache.sshd.common.session.ConnectionService;
|
||||
import org.apache.sshd.common.session.Session;
|
||||
|
||||
public interface SshAgentFactory
|
||||
{
|
||||
List<ChannelFactory> getChannelForwardingFactories(FactoryManager p0);
|
||||
SshAgent createClient(Session p0, FactoryManager p1);
|
||||
SshAgentServer createServer(ConnectionService p0);
|
||||
}
|
||||
14
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgentKeyConstraint.java
generated
Normal file
14
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgentKeyConstraint.java
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// Generated automatically from org.apache.sshd.agent.SshAgentKeyConstraint for testing purposes
|
||||
|
||||
package org.apache.sshd.agent;
|
||||
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
|
||||
abstract public class SshAgentKeyConstraint
|
||||
{
|
||||
protected SshAgentKeyConstraint() {}
|
||||
protected SshAgentKeyConstraint(byte p0){}
|
||||
public byte getId(){ return 0; }
|
||||
public static SshAgentKeyConstraint CONFIRM = null;
|
||||
public void put(Buffer p0){}
|
||||
}
|
||||
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgentServer.java
generated
Normal file
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/SshAgentServer.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from org.apache.sshd.agent.SshAgentServer for testing purposes
|
||||
|
||||
package org.apache.sshd.agent;
|
||||
|
||||
import java.nio.channels.Channel;
|
||||
|
||||
public interface SshAgentServer extends Channel
|
||||
{
|
||||
String getId();
|
||||
}
|
||||
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/common/AgentForwardSupport.java
generated
Normal file
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/agent/common/AgentForwardSupport.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from org.apache.sshd.agent.common.AgentForwardSupport for testing purposes
|
||||
|
||||
package org.apache.sshd.agent.common;
|
||||
|
||||
import org.apache.sshd.common.Closeable;
|
||||
|
||||
public interface AgentForwardSupport extends Closeable
|
||||
{
|
||||
String initialize();
|
||||
}
|
||||
43
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/ClientAuthenticationManager.java
generated
Normal file
43
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/ClientAuthenticationManager.java
generated
Normal file
@@ -0,0 +1,43 @@
|
||||
// Generated automatically from org.apache.sshd.client.ClientAuthenticationManager for testing purposes
|
||||
|
||||
package org.apache.sshd.client;
|
||||
|
||||
import java.security.KeyPair;
|
||||
import java.util.Collection;
|
||||
import org.apache.sshd.client.auth.AuthenticationIdentitiesProvider;
|
||||
import org.apache.sshd.client.auth.UserAuth;
|
||||
import org.apache.sshd.client.auth.UserAuthFactory;
|
||||
import org.apache.sshd.client.auth.hostbased.HostBasedAuthenticationReporter;
|
||||
import org.apache.sshd.client.auth.keyboard.UserInteraction;
|
||||
import org.apache.sshd.client.auth.password.PasswordAuthenticationReporter;
|
||||
import org.apache.sshd.client.auth.password.PasswordIdentityProvider;
|
||||
import org.apache.sshd.client.auth.pubkey.PublicKeyAuthenticationReporter;
|
||||
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.common.auth.UserAuthFactoriesManager;
|
||||
import org.apache.sshd.common.auth.UserAuthInstance;
|
||||
import org.apache.sshd.common.auth.UserAuthMethodFactory;
|
||||
import org.apache.sshd.common.keyprovider.KeyIdentityProviderHolder;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
|
||||
public interface ClientAuthenticationManager extends KeyIdentityProviderHolder, UserAuthFactoriesManager<ClientSession, UserAuth, UserAuthFactory>
|
||||
{
|
||||
AuthenticationIdentitiesProvider getRegisteredIdentities();
|
||||
HostBasedAuthenticationReporter getHostBasedAuthenticationReporter();
|
||||
KeyPair removePublicKeyIdentity(KeyPair p0);
|
||||
PasswordAuthenticationReporter getPasswordAuthenticationReporter();
|
||||
PasswordIdentityProvider getPasswordIdentityProvider();
|
||||
PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter();
|
||||
ServerKeyVerifier getServerKeyVerifier();
|
||||
String removePasswordIdentity(String p0);
|
||||
UserInteraction getUserInteraction();
|
||||
default void setUserAuthFactoriesNames(Collection<String> p0){}
|
||||
void addPasswordIdentity(String p0);
|
||||
void addPublicKeyIdentity(KeyPair p0);
|
||||
void setHostBasedAuthenticationReporter(HostBasedAuthenticationReporter p0);
|
||||
void setPasswordAuthenticationReporter(PasswordAuthenticationReporter p0);
|
||||
void setPasswordIdentityProvider(PasswordIdentityProvider p0);
|
||||
void setPublicKeyAuthenticationReporter(PublicKeyAuthenticationReporter p0);
|
||||
void setServerKeyVerifier(ServerKeyVerifier p0);
|
||||
void setUserInteraction(UserInteraction p0);
|
||||
}
|
||||
17
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/ClientFactoryManager.java
generated
Normal file
17
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/ClientFactoryManager.java
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// Generated automatically from org.apache.sshd.client.ClientFactoryManager for testing purposes
|
||||
|
||||
package org.apache.sshd.client;
|
||||
|
||||
import org.apache.sshd.client.ClientAuthenticationManager;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntryResolver;
|
||||
import org.apache.sshd.client.config.keys.ClientIdentityLoaderManager;
|
||||
import org.apache.sshd.client.session.ClientProxyConnectorHolder;
|
||||
import org.apache.sshd.client.session.ClientSessionCreator;
|
||||
import org.apache.sshd.common.FactoryManager;
|
||||
import org.apache.sshd.common.config.keys.FilePasswordProviderManager;
|
||||
|
||||
public interface ClientFactoryManager extends ClientAuthenticationManager, ClientIdentityLoaderManager, ClientProxyConnectorHolder, ClientSessionCreator, FactoryManager, FilePasswordProviderManager
|
||||
{
|
||||
HostConfigEntryResolver getHostConfigEntryResolver();
|
||||
void setHostConfigEntryResolver(HostConfigEntryResolver p0);
|
||||
}
|
||||
108
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/SshClient.java
generated
Normal file
108
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/SshClient.java
generated
Normal file
@@ -0,0 +1,108 @@
|
||||
// Generated automatically from org.apache.sshd.client.SshClient for testing purposes
|
||||
|
||||
package org.apache.sshd.client;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.file.LinkOption;
|
||||
import java.nio.file.Path;
|
||||
import java.security.KeyPair;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.ClientFactoryManager;
|
||||
import org.apache.sshd.client.auth.AuthenticationIdentitiesProvider;
|
||||
import org.apache.sshd.client.auth.UserAuthFactory;
|
||||
import org.apache.sshd.client.auth.hostbased.HostBasedAuthenticationReporter;
|
||||
import org.apache.sshd.client.auth.keyboard.UserInteraction;
|
||||
import org.apache.sshd.client.auth.password.PasswordAuthenticationReporter;
|
||||
import org.apache.sshd.client.auth.password.PasswordIdentityProvider;
|
||||
import org.apache.sshd.client.auth.pubkey.PublicKeyAuthenticationReporter;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntry;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntryResolver;
|
||||
import org.apache.sshd.client.config.keys.ClientIdentityLoader;
|
||||
import org.apache.sshd.client.future.ConnectFuture;
|
||||
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
|
||||
import org.apache.sshd.client.session.ClientProxyConnector;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.SessionFactory;
|
||||
import org.apache.sshd.client.simple.SimpleClient;
|
||||
import org.apache.sshd.common.AttributeRepository;
|
||||
import org.apache.sshd.common.Closeable;
|
||||
import org.apache.sshd.common.Factory;
|
||||
import org.apache.sshd.common.NamedResource;
|
||||
import org.apache.sshd.common.ServiceFactory;
|
||||
import org.apache.sshd.common.config.keys.FilePasswordProvider;
|
||||
import org.apache.sshd.common.future.SshFuture;
|
||||
import org.apache.sshd.common.future.SshFutureListener;
|
||||
import org.apache.sshd.common.helpers.AbstractFactoryManager;
|
||||
import org.apache.sshd.common.io.IoConnectFuture;
|
||||
import org.apache.sshd.common.io.IoConnector;
|
||||
import org.apache.sshd.common.io.IoSession;
|
||||
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
|
||||
|
||||
public class SshClient extends AbstractFactoryManager implements ClientFactoryManager, Closeable
|
||||
{
|
||||
protected Closeable getInnerCloseable(){ return null; }
|
||||
protected ConnectFuture doConnect(HostConfigEntry p0, List<HostConfigEntry> p1, AttributeRepository p2, SocketAddress p3){ return null; }
|
||||
protected ConnectFuture doConnect(String p0, SocketAddress p1, AttributeRepository p2, SocketAddress p3, KeyIdentityProvider p4, HostConfigEntry p5){ return null; }
|
||||
protected HostConfigEntry resolveHost(String p0, String p1, int p2, AttributeRepository p3, SocketAddress p4){ return null; }
|
||||
protected IoConnector connector = null;
|
||||
protected IoConnector createConnector(){ return null; }
|
||||
protected KeyIdentityProvider preloadClientIdentities(Collection<? extends NamedResource> p0){ return null; }
|
||||
protected List<HostConfigEntry> parseProxyJumps(String p0, AttributeRepository p1){ return null; }
|
||||
protected List<UserAuthFactory> userAuthFactories = null;
|
||||
protected SessionFactory createSessionFactory(){ return null; }
|
||||
protected SessionFactory sessionFactory = null;
|
||||
protected SshFutureListener<IoConnectFuture> createConnectCompletionListener(ConnectFuture p0, String p1, SocketAddress p2, KeyIdentityProvider p3, HostConfigEntry p4){ return null; }
|
||||
protected void checkConfig(){}
|
||||
protected void onConnectOperationComplete(IoSession p0, ConnectFuture p1, String p2, SocketAddress p3, KeyIdentityProvider p4, HostConfigEntry p5){}
|
||||
protected void setupDefaultSessionIdentities(ClientSession p0, KeyIdentityProvider p1){}
|
||||
public AuthenticationIdentitiesProvider getRegisteredIdentities(){ return null; }
|
||||
public ClientIdentityLoader getClientIdentityLoader(){ return null; }
|
||||
public ClientProxyConnector getClientProxyConnector(){ return null; }
|
||||
public ConnectFuture connect(HostConfigEntry p0, AttributeRepository p1, SocketAddress p2){ return null; }
|
||||
public ConnectFuture connect(String p0){ return null; }
|
||||
public ConnectFuture connect(String p0, SocketAddress p1, AttributeRepository p2, SocketAddress p3){ return null; }
|
||||
public ConnectFuture connect(String p0, String p1, int p2, AttributeRepository p3, SocketAddress p4){ return null; }
|
||||
public FilePasswordProvider getFilePasswordProvider(){ return null; }
|
||||
public HostBasedAuthenticationReporter getHostBasedAuthenticationReporter(){ return null; }
|
||||
public HostConfigEntryResolver getHostConfigEntryResolver(){ return null; }
|
||||
public KeyIdentityProvider getKeyIdentityProvider(){ return null; }
|
||||
public KeyPair removePublicKeyIdentity(KeyPair p0){ return null; }
|
||||
public List<UserAuthFactory> getUserAuthFactories(){ return null; }
|
||||
public PasswordAuthenticationReporter getPasswordAuthenticationReporter(){ return null; }
|
||||
public PasswordIdentityProvider getPasswordIdentityProvider(){ return null; }
|
||||
public PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter(){ return null; }
|
||||
public ServerKeyVerifier getServerKeyVerifier(){ return null; }
|
||||
public SessionFactory getSessionFactory(){ return null; }
|
||||
public SshClient(){}
|
||||
public String removePasswordIdentity(String p0){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public UserInteraction getUserInteraction(){ return null; }
|
||||
public boolean isStarted(){ return false; }
|
||||
public static <C extends SshClient> C setKeyPairProvider(C p0, Path p1, boolean p2, boolean p3, FilePasswordProvider p4, LinkOption... p5){ return null; }
|
||||
public static <C extends SshClient> C setKeyPairProvider(C p0, boolean p1, boolean p2, FilePasswordProvider p3, LinkOption... p4){ return null; }
|
||||
public static Factory<SshClient> DEFAULT_SSH_CLIENT_FACTORY = null;
|
||||
public static List<ServiceFactory> DEFAULT_SERVICE_FACTORIES = null;
|
||||
public static List<UserAuthFactory> DEFAULT_USER_AUTH_FACTORIES = null;
|
||||
public static SimpleClient setUpDefaultSimpleClient(){ return null; }
|
||||
public static SimpleClient wrapAsSimpleClient(SshClient p0){ return null; }
|
||||
public static SshClient setUpDefaultClient(){ return null; }
|
||||
public void addPasswordIdentity(String p0){}
|
||||
public void addPublicKeyIdentity(KeyPair p0){}
|
||||
public void open(){}
|
||||
public void setClientIdentityLoader(ClientIdentityLoader p0){}
|
||||
public void setClientProxyConnector(ClientProxyConnector p0){}
|
||||
public void setFilePasswordProvider(FilePasswordProvider p0){}
|
||||
public void setHostBasedAuthenticationReporter(HostBasedAuthenticationReporter p0){}
|
||||
public void setHostConfigEntryResolver(HostConfigEntryResolver p0){}
|
||||
public void setKeyIdentityProvider(KeyIdentityProvider p0){}
|
||||
public void setPasswordAuthenticationReporter(PasswordAuthenticationReporter p0){}
|
||||
public void setPasswordIdentityProvider(PasswordIdentityProvider p0){}
|
||||
public void setPublicKeyAuthenticationReporter(PublicKeyAuthenticationReporter p0){}
|
||||
public void setServerKeyVerifier(ServerKeyVerifier p0){}
|
||||
public void setSessionFactory(SessionFactory p0){}
|
||||
public void setUserAuthFactories(List<UserAuthFactory> p0){}
|
||||
public void setUserInteraction(UserInteraction p0){}
|
||||
public void start(){}
|
||||
public void stop(){}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.AuthenticationIdentitiesProvider for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.auth.password.PasswordIdentityProvider;
|
||||
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
|
||||
public interface AuthenticationIdentitiesProvider extends KeyIdentityProvider, PasswordIdentityProvider
|
||||
{
|
||||
Iterable<? extends Object> loadIdentities(SessionContext p0);
|
||||
static AuthenticationIdentitiesProvider wrapIdentities(Iterable<? extends Object> p0){ return null; }
|
||||
static Comparator<Object> KEYPAIR_IDENTITY_COMPARATOR = null;
|
||||
static Comparator<Object> PASSWORD_IDENTITY_COMPARATOR = null;
|
||||
static int findIdentityIndex(List<? extends Object> p0, Comparator<? super Object> p1, Object p2){ return 0; }
|
||||
}
|
||||
19
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/auth/UserAuth.java
generated
Normal file
19
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/auth/UserAuth.java
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.UserAuth for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.ClientSessionHolder;
|
||||
import org.apache.sshd.common.auth.UserAuthInstance;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
|
||||
public interface UserAuth extends ClientSessionHolder, UserAuthInstance<ClientSession>
|
||||
{
|
||||
boolean process(Buffer p0);
|
||||
default void signalAuthMethodFailure(ClientSession p0, String p1, boolean p2, List<String> p3, Buffer p4){}
|
||||
default void signalAuthMethodSuccess(ClientSession p0, String p1, Buffer p2){}
|
||||
void destroy();
|
||||
void init(ClientSession p0, String p1);
|
||||
}
|
||||
13
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/auth/UserAuthFactory.java
generated
Normal file
13
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/auth/UserAuthFactory.java
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.UserAuthFactory for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth;
|
||||
|
||||
import org.apache.sshd.client.auth.UserAuth;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.common.auth.UserAuthInstance;
|
||||
import org.apache.sshd.common.auth.UserAuthMethodFactory;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
|
||||
public interface UserAuthFactory extends UserAuthMethodFactory<ClientSession, UserAuth>
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.hostbased.HostBasedAuthenticationReporter for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth.hostbased;
|
||||
|
||||
import java.security.KeyPair;
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface HostBasedAuthenticationReporter
|
||||
{
|
||||
default void signalAuthenticationAttempt(ClientSession p0, String p1, KeyPair p2, String p3, String p4, byte[] p5){}
|
||||
default void signalAuthenticationExhausted(ClientSession p0, String p1, String p2, String p3){}
|
||||
default void signalAuthenticationFailure(ClientSession p0, String p1, KeyPair p2, String p3, String p4, boolean p5, List<String> p6){}
|
||||
default void signalAuthenticationSuccess(ClientSession p0, String p1, KeyPair p2, String p3, String p4){}
|
||||
}
|
||||
26
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/auth/keyboard/UserInteraction.java
generated
Normal file
26
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/auth/keyboard/UserInteraction.java
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.keyboard.UserInteraction for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth.keyboard;
|
||||
|
||||
import java.security.KeyPair;
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface UserInteraction
|
||||
{
|
||||
String getUpdatedPassword(ClientSession p0, String p1, String p2);
|
||||
String[] interactive(ClientSession p0, String p1, String p2, String p3, String[] p4, boolean[] p5);
|
||||
default KeyPair resolveAuthPublicKeyIdentityAttempt(ClientSession p0){ return null; }
|
||||
default String resolveAuthPasswordAttempt(ClientSession p0){ return null; }
|
||||
default boolean isInteractionAllowed(ClientSession p0){ return false; }
|
||||
default void serverVersionInfo(ClientSession p0, List<String> p1){}
|
||||
default void welcome(ClientSession p0, String p1, String p2){}
|
||||
static String AUTO_DETECT_PASSWORD_PROMPT = null;
|
||||
static String CHECK_INTERACTIVE_PASSWORD_DELIM = null;
|
||||
static String DEFAULT_CHECK_INTERACTIVE_PASSWORD_DELIM = null;
|
||||
static String DEFAULT_INTERACTIVE_PASSWORD_PROMPT = null;
|
||||
static String INTERACTIVE_PASSWORD_PROMPT = null;
|
||||
static UserInteraction NONE = null;
|
||||
static boolean DEFAULT_AUTO_DETECT_PASSWORD_PROMPT = false;
|
||||
static int findPromptComponentLastPosition(String p0, String p1){ return 0; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.password.PasswordAuthenticationReporter for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth.password;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface PasswordAuthenticationReporter
|
||||
{
|
||||
default void signalAuthenticationAttempt(ClientSession p0, String p1, String p2, boolean p3, String p4){}
|
||||
default void signalAuthenticationExhausted(ClientSession p0, String p1){}
|
||||
default void signalAuthenticationFailure(ClientSession p0, String p1, String p2, boolean p3, List<String> p4){}
|
||||
default void signalAuthenticationSuccess(ClientSession p0, String p1, String p2){}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.password.PasswordIdentityProvider for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth.password;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
|
||||
public interface PasswordIdentityProvider
|
||||
{
|
||||
Iterable<String> loadPasswords(SessionContext p0);
|
||||
static Iterable<String> iterableOf(SessionContext p0, Collection<? extends PasswordIdentityProvider> p1){ return null; }
|
||||
static Iterator<String> iteratorOf(SessionContext p0, PasswordIdentityProvider p1){ return null; }
|
||||
static Iterator<String> iteratorOf(SessionContext p0, PasswordIdentityProvider p1, PasswordIdentityProvider p2){ return null; }
|
||||
static PasswordIdentityProvider EMPTY_PASSWORDS_PROVIDER = null;
|
||||
static PasswordIdentityProvider multiProvider(SessionContext p0, Collection<? extends PasswordIdentityProvider> p1){ return null; }
|
||||
static PasswordIdentityProvider multiProvider(SessionContext p0, PasswordIdentityProvider... p1){ return null; }
|
||||
static PasswordIdentityProvider resolvePasswordIdentityProvider(SessionContext p0, PasswordIdentityProvider p1, PasswordIdentityProvider p2){ return null; }
|
||||
static PasswordIdentityProvider wrapPasswords(Iterable<String> p0){ return null; }
|
||||
static PasswordIdentityProvider wrapPasswords(String... p0){ return null; }
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// Generated automatically from org.apache.sshd.client.auth.pubkey.PublicKeyAuthenticationReporter for testing purposes
|
||||
|
||||
package org.apache.sshd.client.auth.pubkey;
|
||||
|
||||
import java.security.KeyPair;
|
||||
import java.util.List;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface PublicKeyAuthenticationReporter
|
||||
{
|
||||
default void signalAuthenticationAttempt(ClientSession p0, String p1, KeyPair p2, String p3){}
|
||||
default void signalAuthenticationExhausted(ClientSession p0, String p1){}
|
||||
default void signalAuthenticationFailure(ClientSession p0, String p1, KeyPair p2, boolean p3, List<String> p4){}
|
||||
default void signalAuthenticationSuccess(ClientSession p0, String p1, KeyPair p2){}
|
||||
default void signalSignatureAttempt(ClientSession p0, String p1, KeyPair p2, String p3, byte[] p4){}
|
||||
}
|
||||
78
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/AbstractClientChannel.java
generated
Normal file
78
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/AbstractClientChannel.java
generated
Normal file
@@ -0,0 +1,78 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.AbstractClientChannel for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import org.apache.sshd.client.channel.ClientChannel;
|
||||
import org.apache.sshd.client.channel.ClientChannelEvent;
|
||||
import org.apache.sshd.client.future.OpenFuture;
|
||||
import org.apache.sshd.common.Closeable;
|
||||
import org.apache.sshd.common.channel.AbstractChannel;
|
||||
import org.apache.sshd.common.channel.Channel;
|
||||
import org.apache.sshd.common.channel.ChannelAsyncInputStream;
|
||||
import org.apache.sshd.common.channel.ChannelAsyncOutputStream;
|
||||
import org.apache.sshd.common.channel.RequestHandler;
|
||||
import org.apache.sshd.common.channel.StreamingChannel;
|
||||
import org.apache.sshd.common.io.IoInputStream;
|
||||
import org.apache.sshd.common.io.IoOutputStream;
|
||||
import org.apache.sshd.common.util.EventNotifier;
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
|
||||
abstract public class AbstractClientChannel extends AbstractChannel implements ClientChannel
|
||||
{
|
||||
protected AbstractClientChannel() {}
|
||||
protected <C extends Collection<ClientChannelEvent>> C updateCurrentChannelState(C p0){ return null; }
|
||||
protected AbstractClientChannel(String p0){}
|
||||
protected AbstractClientChannel(String p0, Collection<? extends RequestHandler<Channel>> p1){}
|
||||
protected ChannelAsyncInputStream asyncErr = null;
|
||||
protected ChannelAsyncInputStream asyncOut = null;
|
||||
protected ChannelAsyncOutputStream asyncIn = null;
|
||||
protected Closeable getInnerCloseable(){ return null; }
|
||||
protected InputStream in = null;
|
||||
protected InputStream invertedErr = null;
|
||||
protected InputStream invertedOut = null;
|
||||
protected OpenFuture openFuture = null;
|
||||
protected OutputStream err = null;
|
||||
protected OutputStream invertedIn = null;
|
||||
protected OutputStream out = null;
|
||||
protected StreamingChannel.Streaming streaming = null;
|
||||
protected String openFailureLang = null;
|
||||
protected String openFailureMsg = null;
|
||||
protected abstract void doOpen();
|
||||
protected final AtomicBoolean opened = null;
|
||||
protected final AtomicReference<Integer> exitStatusHolder = null;
|
||||
protected final AtomicReference<String> exitSignalHolder = null;
|
||||
protected int openFailureReason = 0;
|
||||
protected void addChannelSignalRequestHandlers(EventNotifier<String> p0){}
|
||||
protected void doWriteData(byte[] p0, int p1, long p2){}
|
||||
protected void doWriteExtendedData(byte[] p0, int p1, long p2){}
|
||||
public InputStream getIn(){ return null; }
|
||||
public InputStream getInvertedErr(){ return null; }
|
||||
public InputStream getInvertedOut(){ return null; }
|
||||
public Integer getExitStatus(){ return null; }
|
||||
public IoInputStream getAsyncErr(){ return null; }
|
||||
public IoInputStream getAsyncOut(){ return null; }
|
||||
public IoOutputStream getAsyncIn(){ return null; }
|
||||
public OpenFuture open(){ return null; }
|
||||
public OpenFuture open(int p0, long p1, long p2, Buffer p3){ return null; }
|
||||
public OutputStream getErr(){ return null; }
|
||||
public OutputStream getInvertedIn(){ return null; }
|
||||
public OutputStream getOut(){ return null; }
|
||||
public Set<ClientChannelEvent> getChannelState(){ return null; }
|
||||
public Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> p0, long p1){ return null; }
|
||||
public StreamingChannel.Streaming getStreaming(){ return null; }
|
||||
public String getChannelType(){ return null; }
|
||||
public String getExitSignal(){ return null; }
|
||||
public void handleOpenFailure(Buffer p0){}
|
||||
public void handleOpenSuccess(int p0, long p1, long p2, Buffer p3){}
|
||||
public void handleWindowAdjust(Buffer p0){}
|
||||
public void setErr(OutputStream p0){}
|
||||
public void setIn(InputStream p0){}
|
||||
public void setOut(OutputStream p0){}
|
||||
public void setStreaming(StreamingChannel.Streaming p0){}
|
||||
}
|
||||
18
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelDirectTcpip.java
generated
Normal file
18
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelDirectTcpip.java
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ChannelDirectTcpip for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import org.apache.sshd.client.channel.AbstractClientChannel;
|
||||
import org.apache.sshd.client.future.OpenFuture;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
public class ChannelDirectTcpip extends AbstractClientChannel
|
||||
{
|
||||
protected ChannelDirectTcpip() {}
|
||||
protected void doOpen(){}
|
||||
protected void doWriteData(byte[] p0, int p1, long p2){}
|
||||
public ChannelDirectTcpip(SshdSocketAddress p0, SshdSocketAddress p1){}
|
||||
public OpenFuture open(){ return null; }
|
||||
public SshdSocketAddress getLocalSocketAddress(){ return null; }
|
||||
public SshdSocketAddress getRemoteSocketAddress(){ return null; }
|
||||
}
|
||||
16
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelExec.java
generated
Normal file
16
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelExec.java
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ChannelExec for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.sshd.client.channel.PtyCapableChannelSession;
|
||||
import org.apache.sshd.common.channel.PtyChannelConfigurationHolder;
|
||||
|
||||
public class ChannelExec extends PtyCapableChannelSession
|
||||
{
|
||||
protected ChannelExec() {}
|
||||
protected void doOpen(){}
|
||||
public ChannelExec(String p0, PtyChannelConfigurationHolder p1, Map<String, ? extends Object> p2){}
|
||||
public void handleFailure(){}
|
||||
public void handleSuccess(){}
|
||||
}
|
||||
21
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelSession.java
generated
Normal file
21
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelSession.java
generated
Normal file
@@ -0,0 +1,21 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ChannelSession for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.io.InputStream;
|
||||
import org.apache.sshd.client.channel.AbstractClientChannel;
|
||||
import org.apache.sshd.common.Closeable;
|
||||
import org.apache.sshd.common.channel.RequestHandler;
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
|
||||
public class ChannelSession extends AbstractClientChannel
|
||||
{
|
||||
protected Closeable getInnerCloseable(){ return null; }
|
||||
protected RequestHandler.Result handleInternalRequest(String p0, boolean p1, Buffer p2){ return null; }
|
||||
protected RequestHandler.Result handleXonXoff(Buffer p0, boolean p1){ return null; }
|
||||
protected int securedRead(InputStream p0, int p1, byte[] p2, int p3, int p4){ return 0; }
|
||||
protected void closeImmediately0(){}
|
||||
protected void doOpen(){}
|
||||
protected void pumpInputStream(){}
|
||||
public ChannelSession(){}
|
||||
}
|
||||
16
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelShell.java
generated
Normal file
16
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelShell.java
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ChannelShell for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.sshd.client.channel.PtyCapableChannelSession;
|
||||
import org.apache.sshd.common.channel.PtyChannelConfigurationHolder;
|
||||
|
||||
public class ChannelShell extends PtyCapableChannelSession
|
||||
{
|
||||
protected ChannelShell() {}
|
||||
protected void doOpen(){}
|
||||
public ChannelShell(PtyChannelConfigurationHolder p0, Map<String, ? extends Object> p1){}
|
||||
public void handleFailure(){}
|
||||
public void handleSuccess(){}
|
||||
}
|
||||
17
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelSubsystem.java
generated
Normal file
17
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ChannelSubsystem.java
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ChannelSubsystem for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import org.apache.sshd.client.channel.ChannelSession;
|
||||
|
||||
public class ChannelSubsystem extends ChannelSession
|
||||
{
|
||||
protected ChannelSubsystem() {}
|
||||
protected void doOpen(){}
|
||||
public ChannelSubsystem(String p0){}
|
||||
public String toString(){ return null; }
|
||||
public final String getSubsystem(){ return null; }
|
||||
public void handleFailure(){}
|
||||
public void handleSuccess(){}
|
||||
public void onClose(Runnable p0){}
|
||||
}
|
||||
39
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ClientChannel.java
generated
Normal file
39
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ClientChannel.java
generated
Normal file
@@ -0,0 +1,39 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ClientChannel for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.Set;
|
||||
import org.apache.sshd.client.channel.ClientChannelEvent;
|
||||
import org.apache.sshd.client.future.OpenFuture;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.ClientSessionHolder;
|
||||
import org.apache.sshd.common.channel.Channel;
|
||||
import org.apache.sshd.common.channel.StreamingChannel;
|
||||
import org.apache.sshd.common.io.IoInputStream;
|
||||
import org.apache.sshd.common.io.IoOutputStream;
|
||||
|
||||
public interface ClientChannel extends Channel, ClientSessionHolder, StreamingChannel
|
||||
{
|
||||
InputStream getInvertedErr();
|
||||
InputStream getInvertedOut();
|
||||
Integer getExitStatus();
|
||||
IoInputStream getAsyncErr();
|
||||
IoInputStream getAsyncOut();
|
||||
IoOutputStream getAsyncIn();
|
||||
OpenFuture open();
|
||||
OutputStream getInvertedIn();
|
||||
Set<ClientChannelEvent> getChannelState();
|
||||
Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> p0, long p1);
|
||||
String getChannelType();
|
||||
String getExitSignal();
|
||||
default ClientSession getClientSession(){ return null; }
|
||||
default Set<ClientChannelEvent> waitFor(Collection<ClientChannelEvent> p0, Duration p1){ return null; }
|
||||
static void validateCommandExitStatusCode(String p0, Integer p1){}
|
||||
void setErr(OutputStream p0);
|
||||
void setIn(InputStream p0);
|
||||
void setOut(OutputStream p0);
|
||||
}
|
||||
12
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ClientChannelEvent.java
generated
Normal file
12
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/channel/ClientChannelEvent.java
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.ClientChannelEvent for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
public enum ClientChannelEvent
|
||||
{
|
||||
CLOSED, EOF, EXIT_SIGNAL, EXIT_STATUS, OPENED, STDERR_DATA, STDOUT_DATA, TIMEOUT;
|
||||
private ClientChannelEvent() {}
|
||||
public static Set<ClientChannelEvent> VALUES = null;
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// Generated automatically from org.apache.sshd.client.channel.PtyCapableChannelSession for testing purposes
|
||||
|
||||
package org.apache.sshd.client.channel;
|
||||
|
||||
import java.util.Map;
|
||||
import org.apache.sshd.client.channel.ChannelSession;
|
||||
import org.apache.sshd.common.channel.PtyChannelConfigurationHolder;
|
||||
import org.apache.sshd.common.channel.PtyChannelConfigurationMutator;
|
||||
import org.apache.sshd.common.channel.PtyMode;
|
||||
|
||||
public class PtyCapableChannelSession extends ChannelSession implements PtyChannelConfigurationMutator
|
||||
{
|
||||
protected PtyCapableChannelSession() {}
|
||||
protected String resolvePtyType(PtyChannelConfigurationHolder p0){ return null; }
|
||||
protected void doOpenPty(){}
|
||||
public Map<PtyMode, Integer> getPtyModes(){ return null; }
|
||||
public Object setEnv(String p0, Object p1){ return null; }
|
||||
public PtyCapableChannelSession(boolean p0, PtyChannelConfigurationHolder p1, Map<String, ? extends Object> p2){}
|
||||
public String getPtyType(){ return null; }
|
||||
public boolean isAgentForwarding(){ return false; }
|
||||
public boolean isUsePty(){ return false; }
|
||||
public int getPtyColumns(){ return 0; }
|
||||
public int getPtyHeight(){ return 0; }
|
||||
public int getPtyLines(){ return 0; }
|
||||
public int getPtyWidth(){ return 0; }
|
||||
public void sendWindowChange(int p0, int p1){}
|
||||
public void sendWindowChange(int p0, int p1, int p2, int p3){}
|
||||
public void setAgentForwarding(boolean p0){}
|
||||
public void setPtyColumns(int p0){}
|
||||
public void setPtyHeight(int p0){}
|
||||
public void setPtyLines(int p0){}
|
||||
public void setPtyModes(Map<PtyMode, Integer> p0){}
|
||||
public void setPtyType(String p0){}
|
||||
public void setPtyWidth(int p0){}
|
||||
public void setUsePty(boolean p0){}
|
||||
public void setupSensibleDefaultPty(){}
|
||||
}
|
||||
113
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/config/hosts/HostConfigEntry.java
generated
Normal file
113
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/config/hosts/HostConfigEntry.java
generated
Normal file
@@ -0,0 +1,113 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.hosts.HostConfigEntry for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.hosts;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.Reader;
|
||||
import java.net.URL;
|
||||
import java.nio.file.OpenOption;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.NavigableSet;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntryResolver;
|
||||
import org.apache.sshd.client.config.hosts.HostPatternsHolder;
|
||||
import org.apache.sshd.common.auth.MutableUserHolder;
|
||||
|
||||
public class HostConfigEntry extends HostPatternsHolder implements MutableUserHolder
|
||||
{
|
||||
public <A extends Appendable> A append(A p0){ return null; }
|
||||
public Collection<String> getIdentities(){ return null; }
|
||||
public HostConfigEntry(){}
|
||||
public HostConfigEntry(String p0, String p1, int p2, String p3){}
|
||||
public HostConfigEntry(String p0, String p1, int p2, String p3, String p4){}
|
||||
public Map<String, String> getProperties(){ return null; }
|
||||
public Map<String, String> updateGlobalProperties(Map<String, String> p0){ return null; }
|
||||
public String appendPropertyValue(String p0, String p1){ return null; }
|
||||
public String getHost(){ return null; }
|
||||
public String getHostName(){ return null; }
|
||||
public String getProperty(String p0){ return null; }
|
||||
public String getProperty(String p0, String p1){ return null; }
|
||||
public String getProxyJump(){ return null; }
|
||||
public String getUsername(){ return null; }
|
||||
public String removeProperty(String p0){ return null; }
|
||||
public String resolveHostName(String p0){ return null; }
|
||||
public String resolveProxyJump(String p0){ return null; }
|
||||
public String resolveUsername(String p0){ return null; }
|
||||
public String setProperty(String p0, String p1){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean isIdentitiesOnly(){ return false; }
|
||||
public boolean processGlobalValues(HostConfigEntry p0){ return false; }
|
||||
public boolean updateGlobalHostName(String p0){ return false; }
|
||||
public boolean updateGlobalIdentities(Collection<String> p0){ return false; }
|
||||
public boolean updateGlobalIdentityOnly(boolean p0){ return false; }
|
||||
public boolean updateGlobalPort(int p0){ return false; }
|
||||
public boolean updateGlobalUserName(String p0){ return false; }
|
||||
public int getPort(){ return 0; }
|
||||
public int resolvePort(int p0){ return 0; }
|
||||
public static <A extends Appendable> A appendHostConfigEntries(A p0, Collection<? extends HostConfigEntry> p1){ return null; }
|
||||
public static <A extends Appendable> A appendNonEmptyPort(A p0, String p1, int p2){ return null; }
|
||||
public static <A extends Appendable> A appendNonEmptyProperties(A p0, Map<String, ? extends Object> p1){ return null; }
|
||||
public static <A extends Appendable> A appendNonEmptyProperty(A p0, String p1, Object p2){ return null; }
|
||||
public static <A extends Appendable> A appendNonEmptyValues(A p0, String p1, Collection<? extends Object> p2){ return null; }
|
||||
public static <A extends Appendable> A appendNonEmptyValues(A p0, String p1, Object... p2){ return null; }
|
||||
public static HostConfigEntry findBestMatch(Collection<? extends HostConfigEntry> p0){ return null; }
|
||||
public static HostConfigEntry findBestMatch(Iterable<? extends HostConfigEntry> p0){ return null; }
|
||||
public static HostConfigEntry findBestMatch(Iterator<? extends HostConfigEntry> p0){ return null; }
|
||||
public static HostConfigEntry normalizeEntry(HostConfigEntry p0, String p1, int p2, String p3, String p4){ return null; }
|
||||
public static HostConfigEntryResolver toHostConfigEntryResolver(Collection<? extends HostConfigEntry> p0){ return null; }
|
||||
public static List<HostConfigEntry> readHostConfigEntries(BufferedReader p0){ return null; }
|
||||
public static List<HostConfigEntry> readHostConfigEntries(InputStream p0, boolean p1){ return null; }
|
||||
public static List<HostConfigEntry> readHostConfigEntries(Path p0, OpenOption... p1){ return null; }
|
||||
public static List<HostConfigEntry> readHostConfigEntries(Reader p0, boolean p1){ return null; }
|
||||
public static List<HostConfigEntry> readHostConfigEntries(URL p0){ return null; }
|
||||
public static List<HostConfigEntry> updateEntriesList(List<HostConfigEntry> p0, HostConfigEntry p1){ return null; }
|
||||
public static List<String> parseConfigValue(String p0){ return null; }
|
||||
public static NavigableSet<String> EXPLICIT_PROPERTIES = null;
|
||||
public static Path getDefaultHostConfigFile(){ return null; }
|
||||
public static String EXCLUSIVE_IDENTITIES_CONFIG_PROP = null;
|
||||
public static String HOST_CONFIG_PROP = null;
|
||||
public static String HOST_NAME_CONFIG_PROP = null;
|
||||
public static String IDENTITY_AGENT = null;
|
||||
public static String IDENTITY_FILE_CONFIG_PROP = null;
|
||||
public static String MULTI_VALUE_SEPARATORS = null;
|
||||
public static String PORT_CONFIG_PROP = null;
|
||||
public static String PROXY_JUMP_CONFIG_PROP = null;
|
||||
public static String STD_CONFIG_FILENAME = null;
|
||||
public static String USER_CONFIG_PROP = null;
|
||||
public static String resolveHostName(String p0, String p1){ return null; }
|
||||
public static String resolveIdentityFilePath(String p0, String p1, int p2, String p3){ return null; }
|
||||
public static String resolveProxyJump(String p0, String p1){ return null; }
|
||||
public static String resolveUsername(String p0, String p1){ return null; }
|
||||
public static StringBuilder appendUserHome(StringBuilder p0){ return null; }
|
||||
public static StringBuilder appendUserHome(StringBuilder p0, Path p1){ return null; }
|
||||
public static StringBuilder appendUserHome(StringBuilder p0, String p1){ return null; }
|
||||
public static boolean DEFAULT_EXCLUSIVE_IDENTITIES = false;
|
||||
public static char HOME_TILDE_CHAR = '0';
|
||||
public static char LOCAL_HOME_MACRO = '0';
|
||||
public static char LOCAL_HOST_MACRO = '0';
|
||||
public static char LOCAL_USER_MACRO = '0';
|
||||
public static char PATH_MACRO_CHAR = '0';
|
||||
public static char REMOTE_HOST_MACRO = '0';
|
||||
public static char REMOTE_PORT_MACRO = '0';
|
||||
public static char REMOTE_USER_MACRO = '0';
|
||||
public static int resolvePort(int p0, int p1){ return 0; }
|
||||
public static void writeHostConfigEntries(OutputStream p0, boolean p1, Collection<? extends HostConfigEntry> p2){}
|
||||
public static void writeHostConfigEntries(Path p0, Collection<? extends HostConfigEntry> p1, OpenOption... p2){}
|
||||
public void addIdentity(Path p0){}
|
||||
public void addIdentity(String p0){}
|
||||
public void processProperty(String p0, Collection<String> p1, boolean p2){}
|
||||
public void setHost(Collection<String> p0){}
|
||||
public void setHost(String p0){}
|
||||
public void setHostName(String p0){}
|
||||
public void setIdentities(Collection<String> p0){}
|
||||
public void setIdentitiesOnly(boolean p0){}
|
||||
public void setPort(int p0){}
|
||||
public void setProperties(Map<String, String> p0){}
|
||||
public void setProxyJump(String p0){}
|
||||
public void setUsername(String p0){}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.hosts.HostConfigEntryResolver for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.hosts;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntry;
|
||||
import org.apache.sshd.common.AttributeRepository;
|
||||
|
||||
public interface HostConfigEntryResolver
|
||||
{
|
||||
HostConfigEntry resolveEffectiveHost(String p0, int p1, SocketAddress p2, String p3, String p4, AttributeRepository p5);
|
||||
static HostConfigEntryResolver EMPTY = null;
|
||||
}
|
||||
19
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/config/hosts/HostPatternValue.java
generated
Normal file
19
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/config/hosts/HostPatternValue.java
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.hosts.HostPatternValue for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.hosts;
|
||||
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class HostPatternValue
|
||||
{
|
||||
public HostPatternValue(){}
|
||||
public HostPatternValue(Pattern p0, boolean p1){}
|
||||
public HostPatternValue(Pattern p0, int p1, boolean p2){}
|
||||
public Pattern getPattern(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean isNegated(){ return false; }
|
||||
public int getPort(){ return 0; }
|
||||
public void setNegated(boolean p0){}
|
||||
public void setPattern(Pattern p0){}
|
||||
public void setPort(int p0){}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.hosts.HostPatternsHolder for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.hosts;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntry;
|
||||
import org.apache.sshd.client.config.hosts.HostPatternValue;
|
||||
|
||||
abstract public class HostPatternsHolder
|
||||
{
|
||||
protected HostPatternsHolder(){}
|
||||
public Collection<HostPatternValue> getPatterns(){ return null; }
|
||||
public boolean isHostMatch(String p0, int p1){ return false; }
|
||||
public static HostPatternValue toPattern(CharSequence p0){ return null; }
|
||||
public static List<HostConfigEntry> findMatchingEntries(String p0, Collection<? extends HostConfigEntry> p1){ return null; }
|
||||
public static List<HostConfigEntry> findMatchingEntries(String p0, HostConfigEntry... p1){ return null; }
|
||||
public static List<HostPatternValue> parsePatterns(CharSequence... p0){ return null; }
|
||||
public static List<HostPatternValue> parsePatterns(Collection<? extends CharSequence> p0){ return null; }
|
||||
public static String ALL_HOSTS_PATTERN = null;
|
||||
public static String PATTERN_CHARS = null;
|
||||
public static boolean isHostMatch(String p0, Pattern p1){ return false; }
|
||||
public static boolean isHostMatch(String p0, int p1, Collection<HostPatternValue> p2){ return false; }
|
||||
public static boolean isPortMatch(int p0, int p1){ return false; }
|
||||
public static boolean isSpecificHostPattern(String p0){ return false; }
|
||||
public static boolean isValidPatternChar(char p0){ return false; }
|
||||
public static char NEGATION_CHAR_PATTERN = '0';
|
||||
public static char NON_STANDARD_PORT_PATTERN_ENCLOSURE_END_DELIM = '0';
|
||||
public static char NON_STANDARD_PORT_PATTERN_ENCLOSURE_START_DELIM = '0';
|
||||
public static char PORT_VALUE_DELIMITER = '0';
|
||||
public static char SINGLE_CHAR_PATTERN = '0';
|
||||
public static char WILDCARD_PATTERN = '0';
|
||||
public void setPatterns(Collection<HostPatternValue> p0){}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.keys.ClientIdentityLoader for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.keys;
|
||||
|
||||
import java.security.KeyPair;
|
||||
import java.util.Collection;
|
||||
import org.apache.sshd.common.NamedResource;
|
||||
import org.apache.sshd.common.config.keys.FilePasswordProvider;
|
||||
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
|
||||
import org.apache.sshd.common.session.SessionContext;
|
||||
|
||||
public interface ClientIdentityLoader
|
||||
{
|
||||
Iterable<KeyPair> loadClientIdentities(SessionContext p0, NamedResource p1, FilePasswordProvider p2);
|
||||
boolean isValidLocation(NamedResource p0);
|
||||
static ClientIdentityLoader DEFAULT = null;
|
||||
static KeyIdentityProvider asKeyIdentityProvider(ClientIdentityLoader p0, Collection<? extends NamedResource> p1, FilePasswordProvider p2, boolean p3){ return null; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.keys.ClientIdentityLoaderHolder for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.keys;
|
||||
|
||||
import org.apache.sshd.client.config.keys.ClientIdentityLoader;
|
||||
|
||||
public interface ClientIdentityLoaderHolder
|
||||
{
|
||||
ClientIdentityLoader getClientIdentityLoader();
|
||||
static ClientIdentityLoaderHolder loaderHolderOf(ClientIdentityLoader p0){ return null; }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from org.apache.sshd.client.config.keys.ClientIdentityLoaderManager for testing purposes
|
||||
|
||||
package org.apache.sshd.client.config.keys;
|
||||
|
||||
import org.apache.sshd.client.config.keys.ClientIdentityLoader;
|
||||
import org.apache.sshd.client.config.keys.ClientIdentityLoaderHolder;
|
||||
|
||||
public interface ClientIdentityLoaderManager extends ClientIdentityLoaderHolder
|
||||
{
|
||||
void setClientIdentityLoader(ClientIdentityLoader p0);
|
||||
}
|
||||
17
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/future/AuthFuture.java
generated
Normal file
17
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/future/AuthFuture.java
generated
Normal file
@@ -0,0 +1,17 @@
|
||||
// Generated automatically from org.apache.sshd.client.future.AuthFuture for testing purposes
|
||||
|
||||
package org.apache.sshd.client.future;
|
||||
|
||||
import org.apache.sshd.common.future.SshFuture;
|
||||
import org.apache.sshd.common.future.VerifiableFuture;
|
||||
|
||||
public interface AuthFuture extends SshFuture<AuthFuture>, VerifiableFuture<AuthFuture>
|
||||
{
|
||||
Throwable getException();
|
||||
boolean isCanceled();
|
||||
boolean isFailure();
|
||||
boolean isSuccess();
|
||||
void cancel();
|
||||
void setAuthed(boolean p0);
|
||||
void setException(Throwable p0);
|
||||
}
|
||||
21
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/future/ConnectFuture.java
generated
Normal file
21
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/future/ConnectFuture.java
generated
Normal file
@@ -0,0 +1,21 @@
|
||||
// Generated automatically from org.apache.sshd.client.future.ConnectFuture for testing purposes
|
||||
|
||||
package org.apache.sshd.client.future;
|
||||
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.ClientSessionHolder;
|
||||
import org.apache.sshd.common.future.SshFuture;
|
||||
import org.apache.sshd.common.future.VerifiableFuture;
|
||||
import org.apache.sshd.common.session.Session;
|
||||
import org.apache.sshd.common.session.SessionHolder;
|
||||
|
||||
public interface ConnectFuture extends ClientSessionHolder, SessionHolder<ClientSession>, SshFuture<ConnectFuture>, VerifiableFuture<ConnectFuture>
|
||||
{
|
||||
Throwable getException();
|
||||
boolean isCanceled();
|
||||
boolean isConnected();
|
||||
default ClientSession getClientSession(){ return null; }
|
||||
void cancel();
|
||||
void setException(Throwable p0);
|
||||
void setSession(ClientSession p0);
|
||||
}
|
||||
16
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/future/OpenFuture.java
generated
Normal file
16
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/future/OpenFuture.java
generated
Normal file
@@ -0,0 +1,16 @@
|
||||
// Generated automatically from org.apache.sshd.client.future.OpenFuture for testing purposes
|
||||
|
||||
package org.apache.sshd.client.future;
|
||||
|
||||
import org.apache.sshd.common.future.SshFuture;
|
||||
import org.apache.sshd.common.future.VerifiableFuture;
|
||||
|
||||
public interface OpenFuture extends SshFuture<OpenFuture>, VerifiableFuture<OpenFuture>
|
||||
{
|
||||
Throwable getException();
|
||||
boolean isCanceled();
|
||||
boolean isOpened();
|
||||
void cancel();
|
||||
void setException(Throwable p0);
|
||||
void setOpened();
|
||||
}
|
||||
12
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/keyverifier/ServerKeyVerifier.java
generated
Normal file
12
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/keyverifier/ServerKeyVerifier.java
generated
Normal file
@@ -0,0 +1,12 @@
|
||||
// Generated automatically from org.apache.sshd.client.keyverifier.ServerKeyVerifier for testing purposes
|
||||
|
||||
package org.apache.sshd.client.keyverifier;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import java.security.PublicKey;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface ServerKeyVerifier
|
||||
{
|
||||
boolean verifyServerKey(ClientSession p0, SocketAddress p1, PublicKey p2);
|
||||
}
|
||||
104
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/AbstractClientSession.java
generated
Normal file
104
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/AbstractClientSession.java
generated
Normal file
@@ -0,0 +1,104 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.AbstractClientSession for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import java.security.KeyPair;
|
||||
import java.security.PublicKey;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.sshd.client.ClientFactoryManager;
|
||||
import org.apache.sshd.client.auth.AuthenticationIdentitiesProvider;
|
||||
import org.apache.sshd.client.auth.UserAuthFactory;
|
||||
import org.apache.sshd.client.auth.hostbased.HostBasedAuthenticationReporter;
|
||||
import org.apache.sshd.client.auth.keyboard.UserInteraction;
|
||||
import org.apache.sshd.client.auth.password.PasswordAuthenticationReporter;
|
||||
import org.apache.sshd.client.auth.password.PasswordIdentityProvider;
|
||||
import org.apache.sshd.client.auth.pubkey.PublicKeyAuthenticationReporter;
|
||||
import org.apache.sshd.client.channel.ChannelDirectTcpip;
|
||||
import org.apache.sshd.client.channel.ChannelExec;
|
||||
import org.apache.sshd.client.channel.ChannelShell;
|
||||
import org.apache.sshd.client.channel.ChannelSubsystem;
|
||||
import org.apache.sshd.client.channel.ClientChannel;
|
||||
import org.apache.sshd.client.keyverifier.ServerKeyVerifier;
|
||||
import org.apache.sshd.client.session.ClientProxyConnector;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.ClientUserAuthService;
|
||||
import org.apache.sshd.common.AttributeRepository;
|
||||
import org.apache.sshd.common.FactoryManager;
|
||||
import org.apache.sshd.common.channel.PtyChannelConfigurationHolder;
|
||||
import org.apache.sshd.common.forward.Forwarder;
|
||||
import org.apache.sshd.common.future.KeyExchangeFuture;
|
||||
import org.apache.sshd.common.io.IoSession;
|
||||
import org.apache.sshd.common.io.IoWriteFuture;
|
||||
import org.apache.sshd.common.kex.KexProposalOption;
|
||||
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
|
||||
import org.apache.sshd.common.session.ConnectionService;
|
||||
import org.apache.sshd.common.session.helpers.AbstractSession;
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
abstract public class AbstractClientSession extends AbstractSession implements ClientSession
|
||||
{
|
||||
protected AbstractClientSession() {}
|
||||
protected AbstractClientSession(ClientFactoryManager p0, IoSession p1){}
|
||||
protected ClientUserAuthService getUserAuthService(){ return null; }
|
||||
protected ConnectionService getConnectionService(){ return null; }
|
||||
protected Forwarder getForwarder(){ return null; }
|
||||
protected IoWriteFuture sendClientIdentification(){ return null; }
|
||||
protected String resolveAvailableSignaturesProposal(FactoryManager p0){ return null; }
|
||||
protected boolean readIdentification(Buffer p0){ return false; }
|
||||
protected byte[] receiveKexInit(Buffer p0){ return null; }
|
||||
protected byte[] sendKexInit(Map<KexProposalOption, String> p0){ return null; }
|
||||
protected final boolean sendImmediateClientIdentification = false;
|
||||
protected final boolean sendImmediateKexInit = false;
|
||||
protected void checkKeys(){}
|
||||
protected void initializeKeyExchangePhase(){}
|
||||
protected void initializeProxyConnector(){}
|
||||
protected void receiveKexInit(Map<KexProposalOption, String> p0, byte[] p1){}
|
||||
protected void setKexSeed(byte... p0){}
|
||||
protected void signalExtraServerVersionInfo(String p0, List<String> p1){}
|
||||
public AttributeRepository getConnectionContext(){ return null; }
|
||||
public AuthenticationIdentitiesProvider getRegisteredIdentities(){ return null; }
|
||||
public ChannelDirectTcpip createDirectTcpipChannel(SshdSocketAddress p0, SshdSocketAddress p1){ return null; }
|
||||
public ChannelExec createExecChannel(String p0, PtyChannelConfigurationHolder p1, Map<String, ? extends Object> p2){ return null; }
|
||||
public ChannelShell createShellChannel(PtyChannelConfigurationHolder p0, Map<String, ? extends Object> p1){ return null; }
|
||||
public ChannelSubsystem createSubsystemChannel(String p0){ return null; }
|
||||
public ClientChannel createChannel(String p0){ return null; }
|
||||
public ClientChannel createChannel(String p0, String p1){ return null; }
|
||||
public ClientFactoryManager getFactoryManager(){ return null; }
|
||||
public ClientProxyConnector getClientProxyConnector(){ return null; }
|
||||
public HostBasedAuthenticationReporter getHostBasedAuthenticationReporter(){ return null; }
|
||||
public KeyExchangeFuture switchToNoneCipher(){ return null; }
|
||||
public KeyIdentityProvider getKeyIdentityProvider(){ return null; }
|
||||
public KeyPair removePublicKeyIdentity(KeyPair p0){ return null; }
|
||||
public List<UserAuthFactory> getUserAuthFactories(){ return null; }
|
||||
public PasswordAuthenticationReporter getPasswordAuthenticationReporter(){ return null; }
|
||||
public PasswordIdentityProvider getPasswordIdentityProvider(){ return null; }
|
||||
public PublicKey getServerKey(){ return null; }
|
||||
public PublicKeyAuthenticationReporter getPublicKeyAuthenticationReporter(){ return null; }
|
||||
public ServerKeyVerifier getServerKeyVerifier(){ return null; }
|
||||
public SocketAddress getConnectAddress(){ return null; }
|
||||
public SshdSocketAddress startDynamicPortForwarding(SshdSocketAddress p0){ return null; }
|
||||
public SshdSocketAddress startLocalPortForwarding(SshdSocketAddress p0, SshdSocketAddress p1){ return null; }
|
||||
public SshdSocketAddress startRemotePortForwarding(SshdSocketAddress p0, SshdSocketAddress p1){ return null; }
|
||||
public String removePasswordIdentity(String p0){ return null; }
|
||||
public UserInteraction getUserInteraction(){ return null; }
|
||||
public void addPasswordIdentity(String p0){}
|
||||
public void addPublicKeyIdentity(KeyPair p0){}
|
||||
public void setClientProxyConnector(ClientProxyConnector p0){}
|
||||
public void setConnectAddress(SocketAddress p0){}
|
||||
public void setHostBasedAuthenticationReporter(HostBasedAuthenticationReporter p0){}
|
||||
public void setKeyIdentityProvider(KeyIdentityProvider p0){}
|
||||
public void setPasswordAuthenticationReporter(PasswordAuthenticationReporter p0){}
|
||||
public void setPasswordIdentityProvider(PasswordIdentityProvider p0){}
|
||||
public void setPublicKeyAuthenticationReporter(PublicKeyAuthenticationReporter p0){}
|
||||
public void setServerKey(PublicKey p0){}
|
||||
public void setServerKeyVerifier(ServerKeyVerifier p0){}
|
||||
public void setUserAuthFactories(List<UserAuthFactory> p0){}
|
||||
public void setUserInteraction(UserInteraction p0){}
|
||||
public void startService(String p0, Buffer p1){}
|
||||
public void stopDynamicPortForwarding(SshdSocketAddress p0){}
|
||||
public void stopLocalPortForwarding(SshdSocketAddress p0){}
|
||||
public void stopRemotePortForwarding(SshdSocketAddress p0){}
|
||||
}
|
||||
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientProxyConnector.java
generated
Normal file
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientProxyConnector.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientProxyConnector for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface ClientProxyConnector
|
||||
{
|
||||
void sendClientProxyMetadata(ClientSession p0);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientProxyConnectorHolder for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import org.apache.sshd.client.session.ClientProxyConnector;
|
||||
|
||||
public interface ClientProxyConnectorHolder
|
||||
{
|
||||
ClientProxyConnector getClientProxyConnector();
|
||||
void setClientProxyConnector(ClientProxyConnector p0);
|
||||
}
|
||||
69
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSession.java
generated
Normal file
69
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSession.java
generated
Normal file
@@ -0,0 +1,69 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientSession for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import java.io.OutputStream;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.charset.Charset;
|
||||
import java.security.PublicKey;
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.apache.sshd.client.ClientAuthenticationManager;
|
||||
import org.apache.sshd.client.ClientFactoryManager;
|
||||
import org.apache.sshd.client.channel.ChannelDirectTcpip;
|
||||
import org.apache.sshd.client.channel.ChannelExec;
|
||||
import org.apache.sshd.client.channel.ChannelShell;
|
||||
import org.apache.sshd.client.channel.ChannelSubsystem;
|
||||
import org.apache.sshd.client.channel.ClientChannel;
|
||||
import org.apache.sshd.client.channel.ClientChannelEvent;
|
||||
import org.apache.sshd.client.future.AuthFuture;
|
||||
import org.apache.sshd.client.session.ClientProxyConnectorHolder;
|
||||
import org.apache.sshd.client.session.forward.DynamicPortForwardingTracker;
|
||||
import org.apache.sshd.client.session.forward.ExplicitPortForwardingTracker;
|
||||
import org.apache.sshd.common.AttributeRepository;
|
||||
import org.apache.sshd.common.channel.PtyChannelConfigurationHolder;
|
||||
import org.apache.sshd.common.forward.PortForwardingManager;
|
||||
import org.apache.sshd.common.future.KeyExchangeFuture;
|
||||
import org.apache.sshd.common.keyprovider.KeyIdentityProvider;
|
||||
import org.apache.sshd.common.session.Session;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
public interface ClientSession extends ClientAuthenticationManager, ClientProxyConnectorHolder, PortForwardingManager, Session
|
||||
{
|
||||
AttributeRepository getConnectionContext();
|
||||
AuthFuture auth();
|
||||
ChannelDirectTcpip createDirectTcpipChannel(SshdSocketAddress p0, SshdSocketAddress p1);
|
||||
ChannelExec createExecChannel(String p0, PtyChannelConfigurationHolder p1, Map<String, ? extends Object> p2);
|
||||
ChannelShell createShellChannel(PtyChannelConfigurationHolder p0, Map<String, ? extends Object> p1);
|
||||
ChannelSubsystem createSubsystemChannel(String p0);
|
||||
ClientChannel createChannel(String p0);
|
||||
ClientChannel createChannel(String p0, String p1);
|
||||
ClientFactoryManager getFactoryManager();
|
||||
KeyExchangeFuture switchToNoneCipher();
|
||||
Map<Object, Object> getMetadataMap();
|
||||
PublicKey getServerKey();
|
||||
Set<ClientSession.ClientSessionEvent> getSessionState();
|
||||
Set<ClientSession.ClientSessionEvent> waitFor(Collection<ClientSession.ClientSessionEvent> p0, long p1);
|
||||
SocketAddress getConnectAddress();
|
||||
default ChannelExec createExecChannel(String p0){ return null; }
|
||||
default ChannelShell createShellChannel(){ return null; }
|
||||
default DynamicPortForwardingTracker createDynamicPortForwardingTracker(SshdSocketAddress p0){ return null; }
|
||||
default ExplicitPortForwardingTracker createLocalPortForwardingTracker(SshdSocketAddress p0, SshdSocketAddress p1){ return null; }
|
||||
default ExplicitPortForwardingTracker createLocalPortForwardingTracker(int p0, SshdSocketAddress p1){ return null; }
|
||||
default ExplicitPortForwardingTracker createRemotePortForwardingTracker(SshdSocketAddress p0, SshdSocketAddress p1){ return null; }
|
||||
default Set<ClientSession.ClientSessionEvent> waitFor(Collection<ClientSession.ClientSessionEvent> p0, Duration p1){ return null; }
|
||||
default String executeRemoteCommand(String p0){ return null; }
|
||||
default String executeRemoteCommand(String p0, OutputStream p1, Charset p2){ return null; }
|
||||
default void executeRemoteCommand(String p0, OutputStream p1, OutputStream p2, Charset p3){}
|
||||
static Iterator<String> passwordIteratorOf(ClientSession p0){ return null; }
|
||||
static KeyIdentityProvider providerOf(ClientSession p0){ return null; }
|
||||
static Set<ClientChannelEvent> REMOTE_COMMAND_WAIT_EVENTS = null;
|
||||
static public enum ClientSessionEvent
|
||||
{
|
||||
AUTHED, CLOSED, TIMEOUT, WAIT_AUTH;
|
||||
private ClientSessionEvent() {}
|
||||
}
|
||||
}
|
||||
27
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSessionCreator.java
generated
Normal file
27
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSessionCreator.java
generated
Normal file
@@ -0,0 +1,27 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientSessionCreator for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import java.net.SocketAddress;
|
||||
import org.apache.sshd.client.config.hosts.HostConfigEntry;
|
||||
import org.apache.sshd.client.future.ConnectFuture;
|
||||
import org.apache.sshd.common.AttributeRepository;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
public interface ClientSessionCreator
|
||||
{
|
||||
ConnectFuture connect(HostConfigEntry p0, AttributeRepository p1, SocketAddress p2);
|
||||
ConnectFuture connect(String p0);
|
||||
ConnectFuture connect(String p0, SocketAddress p1, AttributeRepository p2, SocketAddress p3);
|
||||
ConnectFuture connect(String p0, String p1, int p2, AttributeRepository p3, SocketAddress p4);
|
||||
default ConnectFuture connect(HostConfigEntry p0){ return null; }
|
||||
default ConnectFuture connect(HostConfigEntry p0, AttributeRepository p1){ return null; }
|
||||
default ConnectFuture connect(HostConfigEntry p0, SocketAddress p1){ return null; }
|
||||
default ConnectFuture connect(String p0, SocketAddress p1){ return null; }
|
||||
default ConnectFuture connect(String p0, SocketAddress p1, AttributeRepository p2){ return null; }
|
||||
default ConnectFuture connect(String p0, SocketAddress p1, SocketAddress p2){ return null; }
|
||||
default ConnectFuture connect(String p0, String p1, int p2){ return null; }
|
||||
default ConnectFuture connect(String p0, String p1, int p2, AttributeRepository p3){ return null; }
|
||||
default ConnectFuture connect(String p0, String p1, int p2, SocketAddress p3){ return null; }
|
||||
static AttributeRepository.AttributeKey<SshdSocketAddress> TARGET_SERVER = null;
|
||||
}
|
||||
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSessionHolder.java
generated
Normal file
10
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSessionHolder.java
generated
Normal file
@@ -0,0 +1,10 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientSessionHolder for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
|
||||
public interface ClientSessionHolder
|
||||
{
|
||||
ClientSession getClientSession();
|
||||
}
|
||||
36
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSessionImpl.java
generated
Normal file
36
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientSessionImpl.java
generated
Normal file
@@ -0,0 +1,36 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientSessionImpl for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.apache.sshd.client.ClientFactoryManager;
|
||||
import org.apache.sshd.client.future.AuthFuture;
|
||||
import org.apache.sshd.client.session.AbstractClientSession;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.common.Service;
|
||||
import org.apache.sshd.common.io.IoSession;
|
||||
import org.apache.sshd.common.session.SessionListener;
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
|
||||
public class ClientSessionImpl extends AbstractClientSession
|
||||
{
|
||||
protected ClientSessionImpl() {}
|
||||
protected <C extends Collection<ClientSession.ClientSessionEvent>> C updateCurrentSessionState(C p0){ return null; }
|
||||
protected List<Service> getServices(){ return null; }
|
||||
protected String nextServiceName(){ return null; }
|
||||
protected void handleDisconnect(int p0, String p1, String p2, Buffer p3){}
|
||||
protected void preClose(){}
|
||||
protected void sendInitialServiceRequest(){}
|
||||
protected void signalAuthFailure(Throwable p0){}
|
||||
protected void signalSessionEvent(SessionListener.Event p0){}
|
||||
public AuthFuture auth(){ return null; }
|
||||
public ClientSessionImpl(ClientFactoryManager p0, IoSession p1){}
|
||||
public Map<Object, Object> getMetadataMap(){ return null; }
|
||||
public Set<ClientSession.ClientSessionEvent> getSessionState(){ return null; }
|
||||
public Set<ClientSession.ClientSessionEvent> waitFor(Collection<ClientSession.ClientSessionEvent> p0, long p1){ return null; }
|
||||
public void exceptionCaught(Throwable p0){}
|
||||
public void switchToNextService(){}
|
||||
}
|
||||
41
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientUserAuthService.java
generated
Normal file
41
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/ClientUserAuthService.java
generated
Normal file
@@ -0,0 +1,41 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.ClientUserAuthService for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import org.apache.sshd.client.auth.UserAuthFactory;
|
||||
import org.apache.sshd.client.future.AuthFuture;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.ClientSessionHolder;
|
||||
import org.apache.sshd.client.session.ClientSessionImpl;
|
||||
import org.apache.sshd.common.Service;
|
||||
import org.apache.sshd.common.io.IoWriteFuture;
|
||||
import org.apache.sshd.common.session.Session;
|
||||
import org.apache.sshd.common.util.buffer.Buffer;
|
||||
import org.apache.sshd.common.util.closeable.AbstractCloseable;
|
||||
|
||||
public class ClientUserAuthService extends AbstractCloseable implements ClientSessionHolder, Service
|
||||
{
|
||||
protected ClientUserAuthService() {}
|
||||
protected AuthFuture createAuthFuture(ClientSession p0, String p1){ return null; }
|
||||
protected AuthFuture updateCurrentAuthFuture(ClientSession p0, String p1){ return null; }
|
||||
protected IoWriteFuture sendInitialAuthRequest(ClientSession p0, String p1){ return null; }
|
||||
protected List<String> serverMethods = null;
|
||||
protected final AtomicReference<AuthFuture> authFutureHolder = null;
|
||||
protected final ClientSessionImpl clientSession = null;
|
||||
protected final List<String> clientMethods = null;
|
||||
protected final List<UserAuthFactory> authFactories = null;
|
||||
protected void preClose(){}
|
||||
protected void processUserAuth(Buffer p0){}
|
||||
protected void tryNext(int p0){}
|
||||
public AuthFuture auth(String p0){ return null; }
|
||||
public ClientSession getClientSession(){ return null; }
|
||||
public ClientSession getSession(){ return null; }
|
||||
public ClientUserAuthService(Session p0){}
|
||||
public Map<String, Object> getProperties(){ return null; }
|
||||
public String getCurrentServiceName(){ return null; }
|
||||
public void process(int p0, Buffer p1){}
|
||||
public void start(){}
|
||||
}
|
||||
18
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/SessionFactory.java
generated
Normal file
18
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/session/SessionFactory.java
generated
Normal file
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.SessionFactory for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session;
|
||||
|
||||
import org.apache.sshd.client.ClientFactoryManager;
|
||||
import org.apache.sshd.client.session.ClientSessionImpl;
|
||||
import org.apache.sshd.common.FactoryManager;
|
||||
import org.apache.sshd.common.io.IoSession;
|
||||
import org.apache.sshd.common.session.helpers.AbstractSession;
|
||||
import org.apache.sshd.common.session.helpers.AbstractSessionFactory;
|
||||
|
||||
public class SessionFactory extends AbstractSessionFactory<ClientFactoryManager, ClientSessionImpl>
|
||||
{
|
||||
protected SessionFactory() {}
|
||||
protected ClientSessionImpl doCreateSession(IoSession p0){ return null; }
|
||||
public SessionFactory(ClientFactoryManager p0){}
|
||||
public final ClientFactoryManager getClient(){ return null; }
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.forward.DynamicPortForwardingTracker for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session.forward;
|
||||
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.forward.PortForwardingTracker;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
public class DynamicPortForwardingTracker extends PortForwardingTracker
|
||||
{
|
||||
protected DynamicPortForwardingTracker() {}
|
||||
public DynamicPortForwardingTracker(ClientSession p0, SshdSocketAddress p1, SshdSocketAddress p2){}
|
||||
public void close(){}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.forward.ExplicitPortForwardingTracker for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session.forward;
|
||||
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.forward.PortForwardingTracker;
|
||||
import org.apache.sshd.common.util.net.ConnectionEndpointsIndicator;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
public class ExplicitPortForwardingTracker extends PortForwardingTracker implements ConnectionEndpointsIndicator
|
||||
{
|
||||
protected ExplicitPortForwardingTracker() {}
|
||||
public ExplicitPortForwardingTracker(ClientSession p0, boolean p1, SshdSocketAddress p2, SshdSocketAddress p3, SshdSocketAddress p4){}
|
||||
public SshdSocketAddress getRemoteAddress(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean isLocalForwarding(){ return false; }
|
||||
public void close(){}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
// Generated automatically from org.apache.sshd.client.session.forward.PortForwardingTracker for testing purposes
|
||||
|
||||
package org.apache.sshd.client.session.forward;
|
||||
|
||||
import java.nio.channels.Channel;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.session.ClientSessionHolder;
|
||||
import org.apache.sshd.common.session.Session;
|
||||
import org.apache.sshd.common.session.SessionHolder;
|
||||
import org.apache.sshd.common.util.net.SshdSocketAddress;
|
||||
|
||||
abstract public class PortForwardingTracker implements Channel, ClientSessionHolder, SessionHolder<ClientSession>
|
||||
{
|
||||
protected PortForwardingTracker() {}
|
||||
protected PortForwardingTracker(ClientSession p0, SshdSocketAddress p1, SshdSocketAddress p2){}
|
||||
protected final AtomicBoolean open = null;
|
||||
public ClientSession getClientSession(){ return null; }
|
||||
public ClientSession getSession(){ return null; }
|
||||
public SshdSocketAddress getBoundAddress(){ return null; }
|
||||
public SshdSocketAddress getLocalAddress(){ return null; }
|
||||
public String toString(){ return null; }
|
||||
public boolean isOpen(){ return false; }
|
||||
}
|
||||
11
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/simple/SimpleClient.java
generated
Normal file
11
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/simple/SimpleClient.java
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// Generated automatically from org.apache.sshd.client.simple.SimpleClient for testing purposes
|
||||
|
||||
package org.apache.sshd.client.simple;
|
||||
|
||||
import java.nio.channels.Channel;
|
||||
import org.apache.sshd.client.simple.SimpleClientConfigurator;
|
||||
import org.apache.sshd.client.simple.SimpleSessionClient;
|
||||
|
||||
public interface SimpleClient extends Channel, SimpleClientConfigurator, SimpleSessionClient
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// Generated automatically from org.apache.sshd.client.simple.SimpleClientConfigurator for testing purposes
|
||||
|
||||
package org.apache.sshd.client.simple;
|
||||
|
||||
|
||||
public interface SimpleClientConfigurator
|
||||
{
|
||||
long getAuthenticationTimeout();
|
||||
long getConnectTimeout();
|
||||
static int DEFAULT_PORT = 0;
|
||||
static long DEFAULT_AUTHENTICATION_TIMEOUT = 0;
|
||||
static long DEFAULT_CONNECT_TIMEOUT = 0;
|
||||
void setAuthenticationTimeout(long p0);
|
||||
void setConnectTimeout(long p0);
|
||||
}
|
||||
26
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/simple/SimpleSessionClient.java
generated
Normal file
26
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/client/simple/SimpleSessionClient.java
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
// Generated automatically from org.apache.sshd.client.simple.SimpleSessionClient for testing purposes
|
||||
|
||||
package org.apache.sshd.client.simple;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.nio.channels.Channel;
|
||||
import java.security.KeyPair;
|
||||
import org.apache.sshd.client.session.ClientSession;
|
||||
import org.apache.sshd.client.simple.SimpleClientConfigurator;
|
||||
|
||||
public interface SimpleSessionClient extends Channel, SimpleClientConfigurator
|
||||
{
|
||||
ClientSession sessionLogin(SocketAddress p0, String p1, KeyPair p2);
|
||||
ClientSession sessionLogin(SocketAddress p0, String p1, String p2);
|
||||
ClientSession sessionLogin(String p0, KeyPair p1);
|
||||
ClientSession sessionLogin(String p0, String p1);
|
||||
default ClientSession sessionLogin(InetAddress p0, String p1, KeyPair p2){ return null; }
|
||||
default ClientSession sessionLogin(InetAddress p0, String p1, String p2){ return null; }
|
||||
default ClientSession sessionLogin(InetAddress p0, int p1, String p2, KeyPair p3){ return null; }
|
||||
default ClientSession sessionLogin(InetAddress p0, int p1, String p2, String p3){ return null; }
|
||||
default ClientSession sessionLogin(String p0, String p1, KeyPair p2){ return null; }
|
||||
default ClientSession sessionLogin(String p0, String p1, String p2){ return null; }
|
||||
default ClientSession sessionLogin(String p0, int p1, String p2, KeyPair p3){ return null; }
|
||||
default ClientSession sessionLogin(String p0, int p1, String p2, String p3){ return null; }
|
||||
}
|
||||
9
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/common/AlgorithmNameProvider.java
generated
Normal file
9
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/common/AlgorithmNameProvider.java
generated
Normal file
@@ -0,0 +1,9 @@
|
||||
// Generated automatically from org.apache.sshd.common.AlgorithmNameProvider for testing purposes
|
||||
|
||||
package org.apache.sshd.common;
|
||||
|
||||
|
||||
public interface AlgorithmNameProvider
|
||||
{
|
||||
String getAlgorithm();
|
||||
}
|
||||
20
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/common/AttributeRepository.java
generated
Normal file
20
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/common/AttributeRepository.java
generated
Normal file
@@ -0,0 +1,20 @@
|
||||
// Generated automatically from org.apache.sshd.common.AttributeRepository for testing purposes
|
||||
|
||||
package org.apache.sshd.common;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public interface AttributeRepository
|
||||
{
|
||||
<T> T getAttribute(AttributeRepository.AttributeKey<T> p0);
|
||||
Collection<AttributeRepository.AttributeKey<? extends Object>> attributeKeys();
|
||||
default <T> T resolveAttribute(AttributeRepository.AttributeKey<T> p0){ return null; }
|
||||
int getAttributesCount();
|
||||
static <A> AttributeRepository ofKeyValuePair(AttributeRepository.AttributeKey<A> p0, A p1){ return null; }
|
||||
static AttributeRepository ofAttributesMap(Map<AttributeRepository.AttributeKey<? extends Object>, ? extends Object> p0){ return null; }
|
||||
static public class AttributeKey<T>
|
||||
{
|
||||
public AttributeKey(){}
|
||||
}
|
||||
}
|
||||
14
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/common/AttributeStore.java
generated
Normal file
14
java/ql/test/stubs/apache-mina-sshd-2.8.0/org/apache/sshd/common/AttributeStore.java
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// Generated automatically from org.apache.sshd.common.AttributeStore for testing purposes
|
||||
|
||||
package org.apache.sshd.common;
|
||||
|
||||
import java.util.function.Function;
|
||||
import org.apache.sshd.common.AttributeRepository;
|
||||
|
||||
public interface AttributeStore extends AttributeRepository
|
||||
{
|
||||
<T> T removeAttribute(AttributeRepository.AttributeKey<T> p0);
|
||||
<T> T setAttribute(AttributeRepository.AttributeKey<T> p0, T p1);
|
||||
default <T> T computeAttributeIfAbsent(AttributeRepository.AttributeKey<T> p0, Function<? super AttributeRepository.AttributeKey<T>, ? extends T> p1){ return null; }
|
||||
void clearAttributes();
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user