FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Function disass.datablock.new has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        "disass.datablock.new": function(ctx,event){
            if(event.data!=null){
                let l = event.data.count()*event.data.width;
                if(TAGS.hash[l] != null) event.data.tags=event.data.tags.concat(TAGS.hash[l]);
                if(TAGS.asym_key[l] != null) event.data.tags=event.data.tags.concat(TAGS.asym_key[l]);
Severity: Minor
Found in inspectors/DataClassifier/main.js - 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

Function app.provider.new has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        "app.provider.new": function (ctx, event) {
        
            let cls = ctx.find.get.class(event.data.name);
            if (cls instanceof CLASS.Class) {
                event.data.setImplementedBy(cls);
Severity: Minor
Found in inspectors/ApplicationTopography/main.js - 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

Function findCallerLazy has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

function findCallerLazy(method, depth=0, root=null, loop=null){
    if(root==null){
        root=method.__signature__;
        loop=[];
        loop.push(method.__signature__);  
Severity: Minor
Found in src/Graph.js - 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

Function app.activity.new has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        "app.activity.new": function (ctx, event) {
        
            // to retrieve class implementign this activity
            let cls = ctx.find.get.class(event.data.name);
            if (cls instanceof CLASS.Class) {
Severity: Minor
Found in inspectors/ApplicationTopography/main.js - 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

Function app.service.new has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

        "app.service.new": function (ctx, event) {
        
                let cls = ctx.find.get.class(event.data.name);
                if (cls instanceof CLASS.Class) {
                    event.data.setImplementedBy(cls);
Severity: Minor
Found in inspectors/ApplicationTopography/main.js - 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

Function prepareHookScript has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

    prepareHookScript(){
        let script = `Java.perform(function() {
            var DEXC_MODULE = {};
        `;

Severity: Minor
Found in src/HookManager.js - 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

Function addIntercept has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

HookSet.prototype.addIntercept = function(interceptConfig){
    if(interceptConfig.method == null && interceptConfig.raw == null){
        Logger.error("[HOOK MANAGER] addIntercept(): The method to hook is not defined");
        return null;
    }
Severity: Minor
Found in src/HookManager.js - 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

Avoid deeply nested control flow statements.
Open

                else if(instr[k].opcode.type == CONST.INSTR_TYPE.RET){
                    Logger.debug(`Block ${i} RETURN`)
                    jump = true;
                }
Severity: Major
Found in src/Simplifier.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if( (this.config.maxdepth==-1) || (this.config.maxdepth - this.stack.depth()) > 0){
                            
                            
                            this.invoke( dec.inv.meth, dec.inv.obj, dec.inv.args);
                            
    Severity: Major
    Found in src/SmaliVM.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if(this.stack.callstack.length==1) this.pcmaker.turnOn();
      Severity: Major
      Found in src/SmaliVM.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                        else if(dec.ret != null){
                            break;
                        }
                        else{
                            i++;
        Severity: Major
        Found in src/SmaliVM.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  if(regV.getValue() instanceof VM_ClassInstance){
          
                                      v = `// ${regX}=(ClassInstance)${regV.getValue().parent.name} is not null, so "if(${regX} != 0)" was TRUE. Continue ...`;
                                      state.jump = {type:CONST.INSTR_TYPE.IF, label:oper.right.name};
                                      
          Severity: Major
          Found in src/SmaliVM.js - About 45 mins to fix

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

                print(){
                    let m=`
            Call stack :
            `;
            
            
            Severity: Minor
            Found in src/SmaliVM.js - 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

            Avoid deeply nested control flow statements.
            Open

                                    if(pArguments["p"+i].val != null)
                                        this.stack.last().addArgument(i, getDataTypeOf(margs[i]), 
                                            this.heap.newInstance(margs[i]._name).setConcrete(pArguments["p"+i].val));
                                    else if(pArguments["p"+i].notset==true)
                                        this.stack.last().addArgument(i, getDataTypeOf(margs[i]), this.heap.newInstance(margs[i]._name));
            Severity: Major
            Found in src/SmaliVM.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if(regV.hasCode()){
                                              this.stack.setLocalSymbol(
                                                  regV, 
                                                  DTYPE.IMM_NUMERIC,
                                                  null,
              Severity: Major
              Found in src/SmaliVM.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        if(blocks[i+1].hasPredecessor(blocks[i])==false){
                                            blocks[i+1].addPredecessor(blocks[i]);
                                        }
                Severity: Major
                Found in src/Simplifier.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if(next == null){
                                          
                                          Logger.error("[VM] Basic block 'goto_"+instr[k].right.name+"' targeted by goto is not found.");
                                      }
                  Severity: Major
                  Found in src/SmaliVM.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                    if(bbs.isTryEndBlock()){
                                        if(bbs.hasCatchStatement()){
                                            d = bbs.getCatchStatements();
                                            for(let i=0; i<d.length; i++){
                                                if(d[i].getException() != null)
                    Severity: Major
                    Found in src/SmaliVM.js - About 45 mins to fix

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

                          constructor(config=null){
                              // the manifest data are stored here
                      
                              this.attr = {};
                      
                      
                      Severity: Minor
                      Found in src/AndroidAppComponents.js - 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

                      Avoid deeply nested control flow statements.
                      Open

                                          if(blocks[i].hasSuccessor(next)==false){
                                              blocks[i].addSuccessor(next);
                                          }
                      Severity: Major
                      Found in src/SmaliVM.js - About 45 mins to fix
                        Severity
                        Category
                        Status
                        Source
                        Language