connectbot/sshlib

View on GitHub

Showing 245 of 415 total issues

Avoid too many return statements within this method.
Open

return false;
Severity: Major
Found in src/main/java/com/trilead/ssh2/KnownHosts.java - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

    return;
    Severity: Major
    Found in src/main/java/com/trilead/ssh2/channel/ChannelManager.java - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

      return false;
      Severity: Major
      Found in src/main/java/com/trilead/ssh2/KnownHosts.java - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

        return false;
        Severity: Major
        Found in src/main/java/com/trilead/ssh2/KnownHosts.java - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

          return true;
          Severity: Major
          Found in src/main/java/com/trilead/ssh2/KnownHosts.java - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

            return ECDSASHA2NISTP256Verify.get();
            Severity: Major
            Found in src/main/java/com/trilead/ssh2/signature/ECDSASHA2Verify.java - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

              return false;
              Severity: Major
              Found in src/main/java/com/trilead/ssh2/KnownHosts.java - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                return true;
                Severity: Major
                Found in src/main/java/com/trilead/ssh2/KnownHosts.java - About 30 mins to fix

                  Method setKey has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private void setKey(byte[] key)
                  {
                  /*
                  * - comments are from _Applied Crypto_, Schneier, p338 please be
                  * careful comparing the two, AC numbers the arrays from 1, the enclosed
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/crypto/cipher/BlowFish.java - About 25 mins to fix

                  Method decode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private static byte[] decode(PKCS8EncodedKeySpec keySpec) throws InvalidKeySpecException {
                  byte[] encoded = keySpec.getEncoded();
                  if (encoded.length != ENCODED_SIZE) {
                  throw new InvalidKeySpecException("Key spec is of invalid size");
                  }
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/crypto/keys/Ed25519PrivateKey.java - About 25 mins to fix

                  Method hexToInt has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private static int hexToInt(char c)
                  {
                  if ((c >= 'a') && (c <= 'f'))
                  {
                  return (c - 'a') + 10;
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/crypto/PEMDecoder.java - About 25 mins to fix

                  Method readBytes has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private final void readBytes(byte[] buff, int pos, int len) throws IOException
                  {
                  while (len > 0)
                  {
                  int count = is.read(buff, pos, len);
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/SFTPv3Client.java - About 25 mins to fix

                  Method init has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  @Override
                  public void init(String name) throws IOException {
                  final ECParameterSpec spec;
                   
                  if ("ecdh-sha2-nistp256".equals(name)) {
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/crypto/dh/EcDhExchange.java - About 25 mins to fix

                  Method read has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  public int read(byte[] b, int off, int len) throws IOException
                  {
                  if (b == null)
                  throw new NullPointerException();
                   
                   
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/channel/ChannelInputStream.java - About 25 mins to fix

                  Method isPEMEncrypted has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  public static final boolean isPEMEncrypted(PEMStructure ps) throws IOException
                  {
                  if (ps.pemType == PEM_OPENSSH_PRIVATE_KEY) {
                  TypesReader tr = new TypesReader(ps.data);
                  byte[] magic = tr.readBytes(OPENSSH_V1_MAGIC.length);
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/crypto/PEMDecoder.java - About 25 mins to fix

                  Method removeIdentity has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private void removeIdentity(TypesReader tr) {
                  try
                  {
                  if (failWhenLocked())
                  return;
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 25 mins to fix

                  Method openFile has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private SFTPv3FileHandle openFile(String fileName, int flags, SFTPv3FileAttributes attr) throws IOException
                  {
                  int req_id = generateNextRequestID();
                   
                  TypesWriter tw = new TypesWriter();
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/SFTPv3Client.java - About 25 mins to fix

                  Method removeAllIdentities has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private void removeAllIdentities(TypesReader tr) {
                  try
                  {
                  if (failWhenLocked())
                  return;
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/channel/AuthAgentForwardThread.java - About 25 mins to fix

                  Method onConnect has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private void onConnect(Socks5Server server) throws IOException {
                  final Channel cn;
                   
                  String destHost = server.getHostName();
                  if (destHost == null) {
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/channel/DynamicAcceptThread.java - About 25 mins to fix

                  Method openDirectory has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                  private final byte[] openDirectory(String path) throws IOException
                  {
                  int req_id = generateNextRequestID();
                   
                  TypesWriter tw = new TypesWriter();
                  Severity: Minor
                  Found in src/main/java/com/trilead/ssh2/SFTPv3Client.java - About 25 mins to fix
                  Severity
                  Category
                  Status
                  Source
                  Language