csirtgadgets/verbose-robot

View on GitHub

Showing 161 of 172 total issues

Avoid too many return statements within this function.
Open

        return myfeed, 200
Severity: Major
Found in cif/httpd/indicators.py - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

            return {'data': r, 'message': 'success'}, 201
    Severity: Major
    Found in cif/httpd/indicators.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                  return s
      Severity: Major
      Found in cif/store/sqlite/indicator.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                    return s
        Severity: Major
        Found in cif/store/sqlite/indicator.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                      return s
          Severity: Major
          Found in cif/store/sqlite/indicator.py - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                return r
            Severity: Major
            Found in cif/httpd/app.py - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                      return r
              Severity: Major
              Found in cif/httpd/indicators.py - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                            return api.abort(400)
                Severity: Major
                Found in cif/httpd/indicators.py - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                              return self._pull_feed(filters), 200
                  Severity: Major
                  Found in cif/httpd/indicators.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                                return api.abort(401)
                    Severity: Major
                    Found in cif/httpd/indicators.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                              return api.abort(500)
                      Severity: Major
                      Found in cif/httpd/app.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return s
                        Severity: Major
                        Found in cif/store/sqlite/indicator.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                      return csv, 200
                          Severity: Major
                          Found in cif/httpd/indicators.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return
                            Severity: Major
                            Found in cif/hunter/farsight.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                          return api.abort(400)
                              Severity: Major
                              Found in cif/httpd/tokens.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return
                                Severity: Major
                                Found in cif/store/__init__.py - About 30 mins to fix

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

                                      def _log_search(self, t, data):
                                          # don't log bulk searches
                                          if isinstance(data, list) and len(data) > 1:
                                              return
                                  
                                  
                                  Severity: Minor
                                  Found in cif/store/__init__.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 delete has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def delete(self, token, data=None):
                                          if type(data) is not list:
                                              data = [data]
                                  
                                          ids = []
                                  Severity: Minor
                                  Found in cif/store/sqlite/indicator.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 __init__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                      def __init__(self, **kwargs):
                                  
                                          self.uuid = kwargs.get('uuid')
                                          self.indicator = kwargs.get('indicator')
                                          self.group = kwargs.get('group', 'everyone')
                                  Severity: Minor
                                  Found in cif/store/sqlite/indicator.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 _enabled has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
                                  Open

                                  def _enabled(i):
                                      if not ENABLED and not TOKEN:
                                          return
                                  
                                      if not i.is_ipv4():
                                  Severity: Minor
                                  Found in cif/hunter/farsight.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