hackedteam/test-av

View on GitHub

Showing 1,005 of 1,471 total issues

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

    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Hashes':
            obj_ = HashesType2.factory()
            obj_.build(child_)
            self.set_Hashes(obj_)
Severity: Minor
Found in lib/maec/maec11.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

Avoid too many return statements within this function.
Open

                return request.environ['wsgi.file_wrapper'](out)
Severity: Major
Found in lib/bottle.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

                return self._cast(first)
    Severity: Major
    Found in lib/bottle.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 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 True
          Severity: Major
          Found in lib/cuckoo/core/sniffer.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 self.results
              Severity: Major
              Found in modules/processing/network.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return HTTPError(416, "Requested Range Not Satisfiable")
                Severity: Major
                Found in lib/bottle.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

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

                    Avoid too many return statements within this function.
                    Open

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

                      Avoid too many return statements within this function.
                      Open

                                  return itertools.chain([first], out)
                      Severity: Major
                      Found in lib/bottle.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                return self._cast(HTTPError(500, 'Unsupported response type: %s'\
                        Severity: Major
                        Found in lib/bottle.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return HTTPResponse(body, header=header)
                          Severity: Major
                          Found in lib/bottle.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return True
                            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 None
                              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 "xls"
                                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 self._cast('')
                                  Severity: Major
                                  Found in lib/bottle.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                            return HTTPResponse(body, header=header, status=206)
                                    Severity: Major
                                    Found in lib/bottle.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                      return WSGIFileWrapper(out)
                                      Severity: Major
                                      Found in lib/bottle.py - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language