Showing 446 of 948 total issues
Avoid deeply nested control flow statements. Open
if(instruct.right == null){
Logger.debug("[SAST] Call : method name is null");
}
Avoid deeply nested control flow statements. Open
if(found[instruction.right.name]===undefined)
found[instruction.right.name]=1;
else
found[instruction.right.name]+=1;
Function toJsonObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
toJsonObject( pExcludeList={}){
let o = {};
for(let i in this){
if(pExcludeList[i] === true) continue;
- Read upRead up
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(method.instr[i].hasInstr(CONST.INSTR_TYPE.RET))
duplicate = true;
Avoid deeply nested control flow statements. Open
if(c instanceof CLASS.SwitchCase){
if(c.type == CONST.CASE_TYPE.PACKED)
bbe.instr.push({ value:" :pswitch_"+c.value.toString(16) });
else
bbe.instr.push({ value:" "+c.value+" -> "+c.target });
Function getHelp
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Parser.prototype.getHelp = function(){
if(this.help != null) return this.help;
let usage = "Usage: dexcalibur ";
this.help = "";
- Read upRead up
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 addCustomHook
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
HookSet.prototype.addCustomHook = function(config){
if(config.method == null && config.raw == null){
Logger.error("[HOOK MANAGER] addCustomHook(): The method to hook is not defined");
return null;
}
- Read upRead up
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(DEBUG) console.log("block has jump :",method.instr[i].goto_name,gotoLabel,targetBBs);
Avoid deeply nested control flow statements. Open
if(found[instruction.right.name]===undefined)
found[instruction.right.name]=1;
else
found[instruction.right.name]+=1;
Avoid deeply nested control flow statements. Open
else if(lastWasGoto){
if(instruction.opcode.type !== CONST.INSTR_TYPE.NOP){
console.log("[ERROR] CFG changed !!!");
}
}
Function renameDoubleStatic
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function renameDoubleStatic(database, method, pContext){
if(!hasSingleCall(method)) return false;
- Read upRead up
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 toJsonObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
toJsonObject( pExcludeList={}){
let o = new Object();
for(let i in this){
if(pExcludeList[i] === false) continue;
- Read upRead up
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 verifyField
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
static verifyField( pName, pValue){
let result = null;
switch(pName)
{
- Read upRead up
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(j !== method.instr[i].stack.length-1){
console.log(method.signature(),"[:goto_"+goto_name,"] Not the last instruction")
}
Function toIntercept
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
HookPrimitive.prototype.toIntercept = function(context,set){
let hook = new Hook(context);
hook.variables = this.variables;
- Read upRead up
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(instruction.right.name == gotoLabel){
//console.log(bblocks);
Function findCaller
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function findCaller(method, depth=0, root=null){
if(root==null) root=method.__signature__;
let cfg = { method:method, depth:depth, callers:[] };
- Read upRead up
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 addProbe
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
HookSet.prototype.addProbe = function(probeConfig){
if(probeConfig.method != null){
if(typeof probeConfig.method != "string"){
let probe = null;
for(let i=0; i<probeConfig.method.length; i++){
- Read upRead up
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(hasJump(method.instr[i].stack)){
if(DEBUG) console.log("block has jump POST :",gotoLabel,targetBBs[targetBBs.length-1].stack);
break;
}
Function download
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
download(pRemoteURL, pLocalPath, pCallbacks, pMode=0o666, pEncoding='binary'){