hackedteam/test-av

View on GitHub

Showing 1,005 of 1,471 total issues

Avoid too many return statements within this function.
Open

    return True
Severity: Major
Found in analyzer/windows/lib/core/privileges.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                    return False
    Severity: Major
    Found in analyzer/windows/lib/api/process.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                      return matched
      Severity: Major
      Found in lib/cuckoo/core/processor.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return "doc"
        Severity: Major
        Found in analyzer/windows/lib/core/packages.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return imap(lambda x: x.encode(response.charset),
          Severity: Major
          Found in lib/bottle.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return ExportDirData(
            Severity: Major
            Found in lib/pefile/pefile.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                                      return []
              Severity: Major
              Found in lib/pefile/pefile.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                        return table
                Severity: Major
                Found in lib/pefile/pefile.py - About 30 mins to fix

                  Function run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def run(self):
                          """Create and run PIPE server.
                          @return: operation status.
                          """
                          while self.do_run:
                  Severity: Minor
                  Found in analyzer/windows/analyzer.py - About 25 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 doReboot has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def doReboot(self, vmx):
                          if vmx == "all":
                              vms = self.conf.getMachines()
                              sys.stdout.write("[*] Disabling network on guests.\n")
                              for vm in vms:
                  Severity: Minor
                  Found in utils/manager/av_updates.py - About 25 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 get_type has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def get_type(self):
                          """Get MIME file type.
                          @return: file type.
                          """
                          try:
                  Severity: Minor
                  Found in lib/cuckoo/common/utils.py - About 25 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 start has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def start(self, vm_path, username="", password="", shot_path=""):
                          # creating a file .pid
                          self.lock_file = '/tmp/lock.pid'
                          if not os.path.exists(self.lock_file):
                              lock = open(self.lock_file, 'w')
                  Severity: Minor
                  Found in analyzer/windows/lib/api/screenshot.py - About 25 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 start has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def start(self, path):
                          p = Process()
                  
                          if "arguments" in self.options:
                              p.execute(path=path, args=self.options["arguments"], suspended=True)
                  Severity: Minor
                  Found in analyzer/windows/packages/exe.py - About 25 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 run has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def run(self):
                          """Run Yara processing.
                          @return: hash with matches.
                          """
                          self.key = "yara"
                  Severity: Minor
                  Found in modules/processing/yarasignatures.py - About 25 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 release has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def release(self, label=None):
                          """Release a machine.
                          @param label: machine name.
                          """
                          if label:
                  Severity: Minor
                  Found in lib/cuckoo/common/abstracts.py - About 25 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 start has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def start(self, interface="eth0", host="", file_path=""):
                          """Start sniffing.
                          @param interface: network interface name.
                          @param host: guest host IP address.
                          @param file_path: tcpdump path.
                  Severity: Minor
                  Found in lib/cuckoo/core/sniffer.py - About 25 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 populate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def populate(self, node):
                          """Populate tree.
                          @param node: node to add.
                          @return: True.
                          """
                  Severity: Minor
                  Found in modules/processing/behavior.py - About 25 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 stop has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def stop(self):
                          """Stop scheduler."""
                          self.running = False
                  
                          # Shutdown vm alive.
                  Severity: Minor
                  Found in lib/cuckoo/core/scheduler.py - About 25 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 add_path has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def add_path(self, path, base=None, index=None, create=False):
                          ''' Add a new path to the list of search paths. Return False if it does
                              not exist.
                  
                              :param path: The new search path. Relative paths are turned into an
                  Severity: Minor
                  Found in lib/bottle.py - About 25 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 execute has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                  Open

                      def execute(self, path=None, args=None, suspended=False):
                          """Execute sample process.
                          @param path: sample path.
                          @param args: process args.
                          @param suspended: is suspended.
                  Severity: Minor
                  Found in analyzer/windows/lib/api/process.py - About 25 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