mozilla/ssh_scan

View on GitHub

Showing 60 of 80 total issues

Avoid too many return statements within this method.
Open

        return SSHScan::SSHLib::SentrySSH.new()
Severity: Major
Found in lib/ssh_scan/banner.rb - About 30 mins to fix

    Avoid too many return statements within this method.
    Open

            return SSHScan::SSHLib::RomSShell.new(@string)
    Severity: Major
    Found in lib/ssh_scan/banner.rb - About 30 mins to fix

      Avoid too many return statements within this method.
      Open

            return kex_exchange_init.to_hash
      Severity: Major
      Found in lib/ssh_scan/client.rb - About 30 mins to fix

        Avoid too many return statements within this method.
        Open

                return SSHScan::SSHLib::ROSSSH.new()
        Severity: Major
        Found in lib/ssh_scan/banner.rb - About 30 mins to fix

          Avoid too many return statements within this method.
          Open

                  return SSHScan::OS::ROS.new
          Severity: Major
          Found in lib/ssh_scan/banner.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                    return SSHScan::OS::Debian.new
            Severity: Major
            Found in lib/ssh_scan/banner.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return SSHScan::SSHLib::Mpssh.new(@string)
              Severity: Major
              Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                        return SSHScan::SSHLib::FlowSsh.new(@string)
                Severity: Major
                Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                          return SSHScan::OS::DOPRA.new
                  Severity: Major
                  Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                            return SSHScan::SSHLib::NosSSH.new(@string)
                    Severity: Major
                    Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                              return SSHScan::OS::Raspbian.new(@string)
                      Severity: Major
                      Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                                return SSHScan::OS::Unknown.new
                        Severity: Major
                        Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                  return SSHScan::SSHLib::Cryptlib.new()
                          Severity: Major
                          Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                    return SSHScan::SSHLib::Dropbear.new(@string)
                            Severity: Major
                            Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                      return SSHScan::SSHLib::DOPRASSH.new()
                              Severity: Major
                              Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                        return SSHScan::OS::Windows.new
                                Severity: Major
                                Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                          return SSHScan::SSHLib::PGP.new()
                                  Severity: Major
                                  Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                            return SSHScan::SSHLib::Unknown.new()
                                    Severity: Major
                                    Found in lib/ssh_scan/banner.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                              return SSHScan::OS::Cisco.new
                                      Severity: Major
                                      Found in lib/ssh_scan/banner.rb - About 30 mins to fix

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

                                            def out_of_policy_auth_methods
                                              return [] if @policy.auth_methods.empty?
                                              return [] if @result.auth_methods.empty?
                                              target_auth_methods = @result.auth_methods
                                              outliers = []
                                        Severity: Minor
                                        Found in lib/ssh_scan/policy_manager.rb - About 25 mins to fix

                                        Cognitive Complexity

                                        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                        A method's cognitive complexity is based on a few simple rules:

                                        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                        • Code is considered more complex for each "break in the linear flow of the code"
                                        • Code is considered more complex when "flow breaking structures are nested"

                                        Further reading

                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language