rapid7/metasploit-framework

View on GitHub
lib/rex/parser/acunetix_document.rb

Summary

Maintainability
F
6 days
Test Coverage

File acunetix_document.rb has 513 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require "rex/parser/nokogiri_doc_mixin"
require 'rex'
require 'uri'

module Rex
Severity: Major
Found in lib/rex/parser/acunetix_document.rb - About 1 day to fix

    Class AcunetixDocument has 36 methods (exceeds 20 allowed). Consider refactoring.
    Open

        load_nokogiri && class AcunetixDocument < Nokogiri::XML::SAX::Document
    
        include NokogiriDocMixin
    
        # The resolver prefers your local /etc/hosts (or windows equiv), but will
    Severity: Minor
    Found in lib/rex/parser/acunetix_document.rb - About 4 hrs to fix

      Method end_element has 89 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def end_element(name=nil)
            block = @block
            case name
            when "Scan"
              # Clears most of the @state out, we're done with this web site.
      Severity: Major
      Found in lib/rex/parser/acunetix_document.rb - About 3 hrs to fix

        Method collect_vuln_from_report_item has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
        Open

            def collect_vuln_from_report_item
              @state[:vuln_info] = nil
              return unless @host_object
              return unless in_tag("Scan")
              return unless in_tag("ReportItems")
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 2 hrs 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

        Method report_web_page has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
        Open

            def report_web_page(&block)
              return if should_skip_this_page
              return unless @state[:web_site]
              @state[:page_request_verb] = nil
              return unless @state[:page_request]
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 2 hrs 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

        Method report_web_site has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring.
        Open

            def report_web_site(url,&block)
              return unless in_tag("Crawler")
              return unless url
              return if url.strip.empty?
              uri = URI.parse(url) rescue nil
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 2 hrs 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

        Method end_element has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
        Open

            def end_element(name=nil)
              block = @block
              case name
              when "Scan"
                # Clears most of the @state out, we're done with this web site.
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 2 hrs 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

        Method collect_service_from_kbitem_text has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            def collect_service_from_kbitem_text
              return unless @host_object
              return unless in_tag("Scan")
              return unless in_tag("KBase")
              return unless in_tag("KBItem")
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 1 hr 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

        Method report_web_vuln has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
        Open

            def report_web_vuln(&block)
              return if should_skip_this_page
              return unless @state[:web_page]
              return unless @state[:web_site]
              return unless @state[:vuln_info]
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 1 hr 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

        Method report_web_page has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def report_web_page(&block)
              return if should_skip_this_page
              return unless @state[:web_site]
              @state[:page_request_verb] = nil
              return unless @state[:page_request]
        Severity: Minor
        Found in lib/rex/parser/acunetix_document.rb - About 1 hr to fix

          Method collect_service_from_url has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_service_from_url
                return unless @report_data[:host]
                return unless in_tag("Scan")
                return unless @text
                return if @text.strip.empty?
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 1 hr 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

          Method report_web_form has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
          Open

              def report_web_form(&block)
                return unless in_tag("SiteFiles")
                return unless @state[:web_site]
                return unless @state[:fullurl].kind_of? URI
                return unless @state[:form_variables].kind_of? Array
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 1 hr 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

          Method collect_report_item_reference_url has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_report_item_reference_url
                return unless in_tag("ReportItem")
                return unless in_tag("References")
                return unless in_tag("Reference")
                return unless @text
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 55 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

          Method report_kbitem_service has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def report_kbitem_service(service,&block)
                return unless @host_object
                return unless @state[:starturl_uri]
                addr = @host_object.address
                svc = {
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 45 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

          Method report_starturl_service has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def report_starturl_service(&block)
                return unless @host_object
                return unless @state[:starturl_uri]
                name = @state[:starturl_uri].scheme
                port = @state[:starturl_uri].port
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 45 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

          Method collect_host has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_host
                return unless in_tag("Scan")
                return unless @text
                return if @text.strip.empty?
                uri = URI.parse(@text) rescue nil
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 45 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

          Method record_variable has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
          Open

              def record_variable(attrs)
                return unless in_tag("Inputs")
                return unless @state[:fullurl].kind_of? URI
                method = attr_hash(attrs)["Type"]
                return unless method
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 45 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

          Method collect_scan_name has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_scan_name
                return unless in_tag("Scan")
                return if in_tag("ReportItems")
                return if in_tag("Crawler")
                return unless @text
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 35 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

          Method report_os_fingerprint has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def report_os_fingerprint
                return unless @state[:starturl_service_object]
                return unless @text
                return if @text.strip.empty?
                return unless in_tag("Scan")
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 35 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

          Method collect_page_request has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_page_request
                return unless in_tag("TechnicalDetails")
                return unless in_tag("ReportItem")
                return unless @text
                return if @text.to_s.empty?
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 35 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

          Method collect_and_report_banner has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_and_report_banner
                return unless (svc = @state[:starturl_service_object]) # Yes i want assignment
                return unless @text
                return if @text.strip.empty?
                return unless in_tag("Scan")
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 35 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

          Method report_host has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def report_host(&block)
                return unless @report_data[:host]
                return unless in_tag("Scan")
                if host_is_okay
                  db.emit(:address,@report_data[:host],&block) if block
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 35 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

          Method collect_page_response has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

              def collect_page_response
                return unless in_tag("TechnicalDetails")
                return unless in_tag("ReportItem")
                return unless @text
                return if @text.to_s.empty?
          Severity: Minor
          Found in lib/rex/parser/acunetix_document.rb - About 35 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

          Avoid too many return statements within this method.
          Open

                return unless @text
          Severity: Major
          Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

            Avoid too many return statements within this method.
            Open

                  return unless @state[:report_item][:severity]
            Severity: Major
            Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

              Avoid too many return statements within this method.
              Open

                      return unless parsed_response
              Severity: Major
              Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                Avoid too many return statements within this method.
                Open

                      return matched
                Severity: Major
                Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                  Avoid too many return statements within this method.
                  Open

                        return unless path
                  Severity: Major
                  Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                    Avoid too many return statements within this method.
                    Open

                          return unless scheme[/^https?/]
                    Severity: Major
                    Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                      Avoid too many return statements within this method.
                      Open

                            return if @text.strip.empty?
                      Severity: Major
                      Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                        Avoid too many return statements within this method.
                        Open

                              return unless @state[:report_item][:name]
                        Severity: Major
                        Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                          Avoid too many return statements within this method.
                          Open

                                return unless @state[:report_item][:severity].downcase == "high"
                          Severity: Major
                          Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                  return if @state[:form_variables].empty?
                            Severity: Major
                            Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                              Avoid too many return statements within this method.
                              Open

                                    return if @text.strip.empty?
                              Severity: Major
                              Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                Avoid too many return statements within this method.
                                Open

                                      return @state[:vuln_info]
                                Severity: Major
                                Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                  Avoid too many return statements within this method.
                                  Open

                                        return unless @text =~ /server is running/
                                  Severity: Major
                                  Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                    Avoid too many return statements within this method.
                                    Open

                                          return unless uri # Sanity checker
                                    Severity: Major
                                    Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                      Avoid too many return statements within this method.
                                      Open

                                            return unless (host && port && scheme)
                                      Severity: Major
                                      Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                        Avoid too many return statements within this method.
                                        Open

                                              return if @text.strip.empty?
                                        Severity: Major
                                        Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                          Avoid too many return statements within this method.
                                          Open

                                                return unless address
                                          Severity: Major
                                          Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                            Avoid too many return statements within this method.
                                            Open

                                                  return unless uri
                                            Severity: Major
                                            Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

                                              Avoid too many return statements within this method.
                                              Open

                                                    return unless service_object
                                              Severity: Major
                                              Found in lib/rex/parser/acunetix_document.rb - About 30 mins to fix

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

                                                    def record_crawler(attrs)
                                                      return unless in_tag("Scan")
                                                      return unless @state[:starturl_service_object]
                                                      starturl = attr_hash(attrs)["StartUrl"]
                                                      return unless starturl
                                                Severity: Minor
                                                Found in lib/rex/parser/acunetix_document.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

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

                                                    def parse_request(request)
                                                      headers = Rex::Proto::Http::Packet::Header.new
                                                      headers.from_s request.dup # It's destructive.
                                                      return unless headers.cmd_string
                                                      verb,req = headers.cmd_string.split(/\s+/)
                                                Severity: Minor
                                                Found in lib/rex/parser/acunetix_document.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

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

                                                    def parse_response(response)
                                                      headers = Rex::Proto::Http::Packet::Header.new
                                                      headers.from_s response.dup # It's destructive.
                                                      return unless headers.cmd_string
                                                      http,code,msg = headers.cmd_string.split(/\s+/)
                                                Severity: Minor
                                                Found in lib/rex/parser/acunetix_document.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

                                                There are no issues that match your filters.

                                                Category
                                                Status