cea-sec/miasm

View on GitHub

Showing 3,020 of 3,020 total issues

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

    def __init__(self, machine, loc_db, produce_solution=PRODUCE_SOLUTION_CODE_COV,
Severity: Minor
Found in miasm/analysis/dse.py - About 35 mins to fix

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

    def vm_load_pe_libs(vm, libs_name, libs, lib_path_base, **kargs):
    Severity: Minor
    Found in miasm/jitter/loader/pe.py - About 35 mins to fix

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

      def vm_load_pe_lib(vm, fname_in, libs, lib_path_base, **kargs):
      Severity: Minor
      Found in miasm/jitter/loader/pe.py - About 35 mins to fix

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

        def get_str(vm, addr, enc, max_char=None, end=u'\x00'):
        Severity: Minor
        Found in miasm/core/types.py - About 35 mins to fix

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

              def __init__(self, arch, attrib, bin_stream, loc_db, **kwargs):
          Severity: Minor
          Found in miasm/core/asmblock.py - About 35 mins to fix

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

            def preload_elf(vm, e, runtime_lib, patch_vm_imp=True, loc_db=None):
            Severity: Minor
            Found in miasm/jitter/loader/elf.py - About 35 mins to fix

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

                  def add_encoding(cls, enc_name, str_enc=None, getter=None, setter=None,
              Severity: Minor
              Found in miasm/core/types.py - About 35 mins to fix

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

                    def __init__(self, types_mngr, expr_types=None,
                Severity: Minor
                Found in miasm/core/objc.py - About 35 mins to fix

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

                  def apply_reloc_x86(elf, vm, section, base_addr, loc_db):
                  Severity: Minor
                  Found in miasm/jitter/loader/elf.py - About 35 mins to fix

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

                    def set_str(vm, addr, s, enc, end=u'\x00'):
                    Severity: Minor
                    Found in miasm/core/types.py - About 35 mins to fix

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

                          def __init__(self, struct, field, fieldtype, void_p_align, void_p_size):
                      Severity: Minor
                      Found in miasm/core/objc.py - About 35 mins to fix

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

                            def cgen_access(self, cgenobj, base_type, offset, deref, lvl=0):
                        Severity: Minor
                        Found in miasm/core/objc.py - About 35 mins to fix

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

                              def _propagate_sol(self, node, partial_sol, graph, todo, propagator):
                          Severity: Minor
                          Found in miasm/core/graph.py - About 35 mins to fix

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

                                def get_size(self, vm, ptr):
                                    """
                                    @vm: a VmMngr instance
                                    @size: ptr to get the size of the associated allocation.
                            
                            
                            Severity: Minor
                            Found in miasm/os_dep/common.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 _extract_dst has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def _extract_dst(self, todo, done):
                                    """
                                    Naive extraction of @todo destinations
                                    WARNING: @todo and @done are modified
                                    """
                            Severity: Minor
                            Found in miasm/ir/ir.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 merge has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def merge(self, other):
                                    """Merge two symbolic states
                                    Only equal expressions are kept in both states
                                    @other: second symbolic state
                                    """
                            Severity: Minor
                            Found in miasm/ir/symbexec_top.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 __init__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __init__(self, irs=None, instr=None):
                                    """Create a new AssignBlock
                                    @irs: (optional) sequence of ExprAssign, or dictionary dst (Expr) -> src
                                          (Expr)
                                    @instr: (optional) associate an instruction with this AssignBlock
                            Severity: Minor
                            Found in miasm/ir/ir.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 set_dst has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def set_dst(self, value):
                                    """Generate a new IRBlock with a dst (IRBlock) fixed to @value"""
                                    irs = []
                                    dst_found = False
                                    for assignblk in self:
                            Severity: Minor
                            Found in miasm/ir/ir.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 treat_element has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                            def treat_element():
                                "Display an element"
                                global graphs, comments, sol_nb, settings, addr, lifter, ircfg
                            
                                try:
                            Severity: Minor
                            Found in example/ida/depgraph.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 __eq__ has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                            Open

                                def __eq__(self, other):
                                    if self.__class__ is not other.__class__:
                                        return False
                                    if self.loc_key != other.loc_key:
                                        return False
                            Severity: Minor
                            Found in miasm/ir/ir.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