FrenchYeti/dexcalibur

View on GitHub

Showing 446 of 948 total issues

Avoid deeply nested control flow statements.
Open

                else if(sml[0].indexOf(':try_end')>-1){
                    this.__tmp_block.setTryEndName(sml[0]);

                    if(this.__tmp_block != null){
                        this.__tmp_meth.appendBlock(this.__tmp_block, this.__appendBlock_callback);
Severity: Major
Found in src/SmaliParser.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                    if(instruct.right === undefined || instruct.right._callers === undefined){
                        Logger.debug("[SAST] Call : method cannot be resolved : ", instruct);
                    }
    Severity: Major
    Found in src/Analyzer.js - About 45 mins to fix

      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/Decompiler.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            for(let l in src.methods[k].instr){
                                block = src.methods[k].instr[l];
                                bbstub = new Core.Stub(
                                    STUB.BASIC_BLOCK,
                                    block,
        Severity: Major
        Found in src/BackupManager.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                          if(method._useClass[instruct.right.fqcn] == undefined){
                              method._useClass[instruct.right.fqcn] = [];
                              method._useClassCtr++;
                          }
          Severity: Major
          Found in src/Analyzer.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if(ref[search.field[i]][k] instanceof CLASS.ObjectType){
                                        //console.log(search.field[i], ref[search.field[i]][k].name, search.field[i+1]);
                                        return this.__checkDeepField( this.__DB.classes.getEntry(ref[search.field[i]][k].name), search, i+1);
                                    }
                                    else if(ref[search.field[i]][k] instanceof CLASS.BasicType){
            Severity: Major
            Found in src/Finder.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                          if(this.isImm(regV))
                                              v+= this.getImmediateValue(regV)+',';
                                          else
                                              v+= regX+',';
              Severity: Major
              Found in src/Decompiler.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    else if(this.__tmp_block.stack.length>0){
                                        this.__tmp_meth.appendBlock(this.__tmp_block, this.__appendBlock_callback);
                                        this.__tmp_block = new CLASS.BasicBlock();
                                        this.__tmp_block.setAsGotoBlock(sml[0].split('_')[1]);
                                    }
                Severity: Major
                Found in src/SmaliParser.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                  if(instruct.isSetter()){
                                      instruct.right.addSetter(method);
                                  }else{
                                      instruct.right.addGetter(method);
                                  }
                  Severity: Major
                  Found in src/Analyzer.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if(this._useMethod[i] != undefined){
                                                obj._useMethod.push(i); //this._useMethod[i].__signature__);
                                            }
                    Severity: Major
                    Found in src/CoreClass.js - About 45 mins to fix

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

                          runTask( pTaskOffset, pStep){
                              let self = this;
                              let task = this.taskList[pTaskOffset];
                      
                              // download
                      Severity: Minor
                      Found in src/Installer.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

                                  else if(instruct.isUsingString()){
                      
                                      // add USAGE: NEW/READ/WRITE
                      
                                      data.strings.insert(new CLASS.StringValue({ 
                      Severity: Major
                      Found in src/Analyzer.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if(this._useField[i] != undefined)
                                                    obj._useField.push(this._useField[i].__signature__);
                        Severity: Major
                        Found in src/CoreClass.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                      if(this.isImm(this.getSymbol(regX)))
                                                          this.setSymbol(this.getRegisterName(oper.left[0]), regV.add(this.getImmediateValue(oper.right), oper.opcode.byte));
                                                      else{
                                                          v = `${this.getRegisterName(oper.left[0])} = ${this.getRegisterName(oper.left[1])}+${this.getImmediateValue(regV)};`;                    
                                                          dec.push(v);
                          Severity: Major
                          Found in src/Decompiler.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                            if(this.inherit[k] != null) m.__inherit = true;
                            Severity: Major
                            Found in src/CoreClass.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/Decompiler.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                    if(this.__tmp_block instanceof CLASS.DataBlock || this.__tmp_block.stack.length>0){
                                                        this.__tmp_meth.appendBlock(this.__tmp_block, this.__appendBlock_callback);
                                                        this.__tmp_block = new CLASS.BasicBlock();
                                                    }
                                Severity: Major
                                Found in src/SmaliParser.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                  if(method._useField[instruct.right.signature()] == undefined){
                                                      method._useField[instruct.right.signature()] = [];
                                                      method._useFieldCtr++;
                                                  }
                                  Severity: Major
                                  Found in src/Analyzer.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                                if(this.simplify >= 1 && this.isImm(regV))
                                                                    v += `${this.getImmediateValue(regV)},`;
                                                                else{
                                                                    v += `${tmp},`;
                                                                }
                                    Severity: Major
                                    Found in src/Decompiler.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                          if(t !==null)
                                                              stmt[j].setTarget(t);
                                                          else{
                                                              Logger.error("Target catch block not found");
                                                              console.log( stmt[j].getTarget());
                                      Severity: Major
                                      Found in src/Analyzer.js - About 45 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language