failmap/admin

View on GitHub

Showing 267 of 577 total issues

Avoid deeply nested control flow statements.
Open

                    for endpoint in url["endpoints"]:

                        # Only add the endpoint once for a series of ratings. And only if the
                        # ratings is not a repeated finding.
                        added_endpoint = False
Severity: Major
Found in websecmap/map/report.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        for endpoint in urlrating["endpoints"]:
    
                            for rating in endpoint["ratings"]:
                                if rating["type"] not in measurement:
                                    measurement[rating["type"]] = {
    Severity: Major
    Found in websecmap/map/report.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if scan_type in PUBLISHED_SCAN_TYPES:
                              vs.urls = measurement[scan_type]["applicable_urls"]
                              vs.endpoints = measurement[scan_type]["applicable_endpoints"]
                          else:
                              # total
      Severity: Major
      Found in websecmap/map/report.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if scan_type in ENDPOINT_SCAN_TYPES:
                                vs.ok = measurement[scan_type]["ok_endpoints"]
                            elif scan_type in URL_SCAN_TYPES:
                                vs.ok = measurement[scan_type]["ok_urls"]
                            else:
        Severity: Major
        Found in websecmap/map/report.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              for rating in urlrating["ratings"]:
          
                                  # log.debug("- type: %s H: %s, M: %s, L: %s" %
                                  #     (rating['type'], rating['high'], rating['medium'], rating['low']))
          
          
          Severity: Major
          Found in websecmap/map/report.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                if (
                                    endpoint_rating["type"] in desired_endpoint_scans
                                    and endpoint_rating.get("comply_or_explain_valid_at_time_of_report", False) is False
                                ):
                                    high += endpoint_rating["high"]
            Severity: Major
            Found in websecmap/map/logic/map.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if url["url"] in noduplicates:
                                      continue
                                  noduplicates.append(url["url"])
              Severity: Major
              Found in websecmap/map/report.py - About 45 mins to fix

                Function can_connect has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                def can_connect(self, protocol: str, url: str, port: int, ip_version: int) -> bool:
                Severity: Minor
                Found in websecmap/scanners/scanner/http.py - About 35 mins to fix

                  Function store_when_new_or_kill_if_gone has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def store_when_new_or_kill_if_gone(connected, url, port, protocol, ip_version):
                  Severity: Minor
                  Found in websecmap/scanners/scanner/ftp.py - About 35 mins to fix

                    Function create has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def create(cls, task: celery.Task, name: str, request, *args, **kwargs) -> "Job":
                    Severity: Minor
                    Found in websecmap/app/models.py - About 35 mins to fix

                      Function retrieve_endpoints_from_urls has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def retrieve_endpoints_from_urls(
                      Severity: Minor
                      Found in websecmap/scanners/plannedscan.py - About 35 mins to fix

                        Function store_url_scan_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def store_url_scan_result(scan_type: str, url_id: int, rating: str, message: str, evidence: str = ""):
                        Severity: Minor
                        Found in websecmap/scanners/scanmanager.py - About 35 mins to fix

                          Function kill_endpoint has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def kill_endpoint(protocol: str, url_id: int, port: int, ip_version: int, origin: str = ""):
                          Severity: Minor
                          Found in websecmap/scanners/scanner/http.py - About 35 mins to fix

                            Function store_endpoint_scan_result has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def store_endpoint_scan_result(scan_type: str, endpoint_id: int, rating: str, message: str, evidence: str = ""):
                            Severity: Minor
                            Found in websecmap/scanners/scanmanager.py - About 35 mins to fix

                              Function add_url_to_new_organization has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def add_url_to_new_organization(country: str, organization_type: str, target_organization_name, url, when):
                              Severity: Minor
                              Found in websecmap/organizations/adminstrative_transformations.py - About 35 mins to fix

                                Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def __init__(self, verbosity=1, failfast=False, keepdb=False, pdb=False, **kwargs):
                                Severity: Minor
                                Found in websecmap/testrunner.py - About 35 mins to fix

                                  Function merge has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def merge(
                                  Severity: Minor
                                  Found in websecmap/organizations/adminstrative_transformations.py - About 35 mins to fix

                                    Function dissolve has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    def dissolve(
                                    Severity: Minor
                                    Found in websecmap/organizations/adminstrative_transformations.py - About 35 mins to fix

                                      Function save_endpoint has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                      def save_endpoint(protocol: str, url_id: int, port: int, ip_version: int, origin: str = ""):
                                      Severity: Minor
                                      Found in websecmap/scanners/scanner/http.py - About 35 mins to fix

                                        Function ticker has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        def ticker(
                                        Severity: Minor
                                        Found in websecmap/map/views.py - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language