cea-sec/miasm

View on GitHub

Showing 1,373 of 3,020 total issues

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

    def __init__(self, parent, sex, size, *args, **kargs):
Severity: Minor
Found in miasm/loader/elf_init.py - About 35 mins to fix

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

    def add_state(ircfg, todo, states, addr, state):
    Severity: Minor
    Found in miasm/analysis/cst_propag.py - About 35 mins to fix

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

          def exec_wrapper(self, loc_key, cpu, _offset_to_jitted_func, _stop_offsets,
      Severity: Minor
      Found in miasm/jitter/jitcore_python.py - About 35 mins to fix

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

        def vm_fix_imports_pe_libs(lib_imgs, libs, lib_path_base,
        Severity: Minor
        Found in miasm/jitter/loader/pe.py - About 35 mins to fix

          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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language