hackedteam/test-av

View on GitHub

Showing 1,005 of 1,471 total issues

Function exportChildren has 5 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def exportChildren(self, outfile, level, namespace_='maec:', name_='Data_HashesType', fromsubclass_=False):
Severity: Minor
Found in lib/maec/maec11.py - About 35 mins to fix

    Function exportChildren has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def exportChildren(self, outfile, level, namespace_='maec:', name_='relationshipsType', fromsubclass_=False):
    Severity: Minor
    Found in lib/maec/maec11.py - About 35 mins to fix

      Function exportAttributes has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def exportAttributes(self, outfile, level, already_processed, namespace_='maec:', name_='fieldDataType'):
      Severity: Minor
      Found in lib/maec/maec11.py - About 35 mins to fix

        Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, definitionVersion=None, detectionAddedTimeStamp=None, detectionShippedTimeStamp=None, product=None, productVersion=None):
        Severity: Minor
        Found in lib/maec/maec11.py - About 35 mins to fix

          Function exportAttributes has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def exportAttributes(self, outfile, level, already_processed, namespace_='maec:', name_='classificationDetailsType'):
          Severity: Minor
          Found in lib/maec/maec11.py - About 35 mins to fix

            Function exportChildren has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def exportChildren(self, outfile, level, namespace_='maec:', name_='sourceType', fromsubclass_=False):
            Severity: Minor
            Found in lib/maec/maec11.py - About 35 mins to fix

              Function wait_for_completion has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def wait_for_completion(self):
                      """Wait for analysis completion.
                      @return: operation status.
                      """
                      while True:
              Severity: Minor
              Found in lib/cuckoo/core/guest.py - 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

              Function urlparts has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def urlparts(self):
                      ''' The :attr:`url` string as an :class:`urlparse.SplitResult` tuple.
                          The tuple contains (scheme, host, path, query_string and fragment),
                          but the fragment is always empty because it is not visible to the
                          server. '''
              Severity: Minor
              Found in lib/bottle.py - 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

              Function _list has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _list(self):
                      """Lists virtual machines installed.
                      @return: virtual machine names list.
                      """
                      try:
              Severity: Minor
              Found in modules/machinemanagers/virtualbox.py - 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

              Function run has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def run(self):
                      """Run analysis.
                      @return: processes infomartion list.
                      """
                      results = []
              Severity: Minor
              Found in modules/processing/behavior.py - 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

              Function reset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def reset(self, route=None):
                      ''' Reset all routes (force plugins to be re-applied) and clear all
                          caches. If an ID or route object is given, only that specific route
                          is affected. '''
                      if route is None: routes = self.routes
              Severity: Minor
              Found in lib/bottle.py - 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

              Function _add_dns has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def _add_dns(self, udpdata):
                      """
                      Adds a DNS data flow.
                      @param udpdata: data inside flow
                      """ 
              Severity: Minor
              Found in modules/processing/network.py - 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

              Function iter_headers has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def iter_headers(self):
                      ''' Yield (header, value) tuples, skipping headers that are not
                          allowed with the current response status code. '''
                      headers = self._headers.items()
                      bad_headers = self.bad_headers.get(self._status_code)
              Severity: Minor
              Found in lib/bottle.py - 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

              Function get_rva_from_offset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def get_rva_from_offset(self, offset):
                      """Get the RVA corresponding to this file offset. """
                      
                      s = self.get_section_by_offset(offset)
                      if not s:
              Severity: Minor
              Found in lib/pefile/pefile.py - 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

              Function get_data has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def get_data(self, rva=0, length=None):
                      """Get data regardless of the section where it lies on.
                      
                      Given a RVA and the size of the chunk to retrieve, this method
                      will find the section where the data lies and return the data.
              Severity: Minor
              Found in lib/pefile/pefile.py - 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

              Function __setattr__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def __setattr__(self, name, val):
              
                      # If the instance doesn't yet have a struct attribute
                      # it's not fully initialized so can't do any of the
                      # following
              Severity: Minor
              Found in lib/pefile/pefile.py - 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

              Function exportChildren has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def exportChildren(self, outfile, level, namespace_='maec:', name_='ActionCollectionType', fromsubclass_=False):
                      if self.Affinity_Type is not None:
                          showIndent(outfile, level)
                          outfile.write('<%sAffinity_Type>%s</%sAffinity_Type>\n' % (namespace_, self.gds_format_string(quote_xml(self.Affinity_Type).encode(ExternalEncoding), input_name='Affinity_Type'), namespace_))
                      if self.Affinity_Degree is not None:
              Severity: Minor
              Found in lib/maec/maec11.py - 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

              Function quote_attrib has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

              def quote_attrib(inStr):
                  s1 = (isinstance(inStr, basestring) and inStr or
                        '%s' % inStr)
                  s1 = s1.replace('&', '&amp;')
                  s1 = s1.replace('<', '&lt;')
              Severity: Minor
              Found in lib/maec/maec11.py - 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

              Function exportLiteralChildren has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def exportLiteralChildren(self, outfile, level, name_):
                      if self.Purpose is not None:
                          showIndent(outfile, level)
                          outfile.write('Purpose=model_.PurposeType(\n')
                          self.Purpose.exportLiteral(outfile, level, name_='Purpose')
              Severity: Minor
              Found in lib/maec/maec11.py - 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

              Function exportLiteralAttributes has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
              Open

                  def exportLiteralAttributes(self, outfile, level, already_processed, name_):
                      if self.successful is not None and 'successful' not in already_processed:
                          already_processed.append('successful')
                          showIndent(outfile, level)
                          outfile.write('successful = %s,\n' % (self.successful,))
              Severity: Minor
              Found in lib/maec/maec11.py - 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

              Severity
              Category
              Status
              Source
              Language