hackedteam/test-av

View on GitHub

Showing 1,005 of 1,471 total issues

Function buildChildren has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Internal_Name':
            Internal_Name_ = child_.text
            Internal_Name_ = self.gds_validate_string(Internal_Name_, node, 'Internal_Name')
            self.Internal_Name = Internal_Name_
Severity: Minor
Found in lib/maec/maec11.py - 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

Function buildChildren has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Version_Block':
            obj_ = Version_BlockType.factory()
            obj_.build(child_)
            self.set_Version_Block(obj_)
Severity: Minor
Found in lib/maec/maec11.py - 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

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

    def exportChildren(self, outfile, level, namespace_='maec:', name_='Network_Object_AttributesType', fromsubclass_=False):
        if self.Internal_Port is not None:
            showIndent(outfile, level)
            outfile.write('<%sInternal_Port>%s</%sInternal_Port>\n' % (namespace_, self.gds_format_integer(self.Internal_Port, input_name='Internal_Port'), namespace_))
        if self.External_Port is not None:
Severity: Minor
Found in lib/maec/maec11.py - 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

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

    def exportChildren(self, outfile, level, namespace_='maec:', name_='Network_Action_AttributesType', fromsubclass_=False):
        if self.Internal_Port is not None:
            showIndent(outfile, level)
            outfile.write('<%sInternal_Port>%s</%sInternal_Port>\n' % (namespace_, self.gds_format_integer(self.Internal_Port, input_name='Internal_Port'), namespace_))
        if self.External_Port is not None:
Severity: Minor
Found in lib/maec/maec11.py - 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

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

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

Function buildChildren has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Initial_Owner':
            Initial_Owner_ = child_.text
            Initial_Owner_ = self.gds_validate_string(Initial_Owner_, node, 'Initial_Owner')
            self.Initial_Owner = Initial_Owner_
Severity: Minor
Found in lib/maec/maec11.py - 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

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

    def exportChildren(self, outfile, level, namespace_='maec:', name_='File_HeaderType', fromsubclass_=False):
        if self.Hashes is not None:
            self.Hashes.export(outfile, level, namespace_, name_='Hashes')
        if self.Machine is not None:
            self.Machine.export(outfile, level, namespace_, name_='Machine')
Severity: Minor
Found in lib/maec/maec11.py - 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

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

    def exportLiteralChildren(self, outfile, level, name_):
        if self.Internal_Name is not None:
            showIndent(outfile, level)
            outfile.write('Internal_Name=%s,\n' % quote_python(self.Internal_Name).encode(ExternalEncoding))
        if self.Product_Name is not None:
Severity: Minor
Found in lib/maec/maec11.py - 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

Function buildChildren has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
Open

    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'file':
            obj_ = fileObject.factory()
            obj_.build(child_)
            self.file.append(obj_)
Severity: Minor
Found in lib/maec/maec11.py - 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

Consider simplifying this complex logical expression.
Open

        if (
            self.Start_Address is not None or
            self.Source_Address is not None or
            self.Destination_Address is not None or
            self.Page_Base_Address is not None or
Severity: Major
Found in lib/maec/maec11.py - About 40 mins to fix

    Consider simplifying this complex logical expression.
    Open

            if (
                self.Affinity_Type is not None or
                self.Affinity_Degree is not None or
                self.Description is not None or
                self.Effect_Sub_Collection or
    Severity: Major
    Found in lib/maec/maec11.py - About 40 mins to fix

      Consider simplifying this complex logical expression.
      Open

              if (
                  self.Text_Title or
                  self.Text or
                  self.Code_Example_Language or
                  self.Code or
      Severity: Major
      Found in lib/maec/maec11.py - About 40 mins to fix

        Consider simplifying this complex logical expression.
        Open

                if (
                    self.Text_Title or
                    self.Text or
                    self.Code_Example_Language or
                    self.Code or
        Severity: Major
        Found in lib/maec/maec11.py - About 40 mins to fix

          Consider simplifying this complex logical expression.
          Open

                  if (
                      self.Existing_File_Name is not None or
                      self.Destination_File_Name is not None or
                      self.Access_Mode is not None or
                      self.Flags is not None or
          Severity: Major
          Found in lib/maec/maec11.py - About 40 mins to fix

            Consider simplifying this complex logical expression.
            Open

                    if (
                        self.Process_Base_Address is not None or
                        self.Thread_ID is not None or
                        self.Start_Address is not None or
                        self.Creation_Flags is not None or
            Severity: Major
            Found in lib/maec/maec11.py - About 40 mins to fix

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

                  def __init__(self, source=None, name=None, lookup=[], encoding='utf8', **settings):
              Severity: Minor
              Found in lib/bottle.py - About 35 mins to fix

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

                    def __init__(self, code=500, output='Unknown Error', exception=None,
                Severity: Minor
                Found in lib/bottle.py - About 35 mins to fix

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

                      def __init__(self, vmrun, vm_path, username, password, shot_path):
                  Severity: Minor
                  Found in lib/cuckoo/core/screener.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_='ActionReferenceType'):
                    Severity: Minor
                    Found in lib/maec/maec11.py - About 35 mins to fix

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

                          def export(self, outfile, level, namespace_='maec:', name_='ObjectType', namespacedef_=''):
                      Severity: Minor
                      Found in lib/maec/maec11.py - About 35 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language