hackedteam/fuzzer-android

View on GitHub

Showing 6 of 64 total issues

Avoid deeply nested control flow statements.
Open

                if c.tag == "ARG_ADDRESS":
                    address = c.text

Severity: Major
Found in trinity-android19/parser/gen_testcase.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

            for kk in range(0, int(t[y+3].value[1:-1])):
              file2.write("recursive_fuzz(STRUCT_" + t[y+1].value + ", &p" + str(k) + "->" + t[y+2].value + "[" + str(kk) + "]);\n")
    
    
    Severity: Major
    Found in trinity-android19/parser/fuzz_generator.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                      if "STRUCT_" in c.tag:
                          if c.text == "unmapped":
                              f.write("void *arg_" + str(child_id)  + "= (void *) " + address + "; //unmapped \n")
                              continue
                              
      Severity: Major
      Found in trinity-android19/parser/gen_testcase.py - About 45 mins to fix

        Consider simplifying this complex logical expression.
        Open

            if t[y].type == "NAME" and t[y+1].type == "NAME" and t[y+2].type == "END":
              if isPrimitive(t[y].value):
                file2.write("//%s is primitive\n" % (t[y+1].value))
                #print("%s is primitive\n" % (t[y+1]))
        
        
        Severity: Major
        Found in trinity-android19/parser/fuzz_generator.py - About 40 mins to fix

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

          def go(query, path):
            """Download full size images from Google image search.
           
            Don't print or republish images without permission.
            I used this to train a learning algorithm.
          Severity: Minor
          Found in jpg_fuzzer_android/script/img_ok.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 create_minset has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
          Open

          def create_minset(hook_list):
              coverage = []
              minset = []
              global average_libxiv_len
              for h in hook_list:
          Severity: Minor
          Found in jpg_fuzzer_android/script/mkminset.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