def load(options={})
      @security_checks = []
      $path = File.join(Dir.pwd, "db")

      enabled_checks  = options[:enabled_checks]  unless options[:enabled_checks].nil?
      mvc             = options[:mvc]             unless options[:mvc].nil?
      $path           = options[:path]            unless options[:path].nil?

      unless __valid?
        $logger.error "An invalid library it has been found. Please use --recovery flag to force fresh install from dawnscanner.org"
        return []
      end

      unless __load?
        $logger.error "The library must be consumed with dawnscanner up to v#{$descriptor["kb"]["api"]}. You are using dawnscanner v#{Dawn::VERSION}"
        return []
      end

      # TODO: untar and unzip from here (look for it in Google)
      if __packed?
        $logger.info "a packed knowledge base it has been found. Unpacking it"
        __unpack
      end

      enabled_checks.each do |d|

        dir = File.join($path, d)

        # Please note that if we enter in this branch, it means someone
        # tampered the KB between the previous __valid? check and this point.
        # Of course this is a very rare situation, but we must handle it.
        unless Dir.exists?(dir)
          $logger.critical "Missing check directory #{dir}"
          $logger.error "An invalid library it has been found. Please use --recovery flag to force fresh install from dawnscanner.org"
          return []
        end

        # Enumerate all YAML file in the give dir

      end

    end
def load(options={})
      @security_checks = []
      $path = File.join(Dir.pwd, "db")

      enabled_checks  = options[:enabled_checks]  unless options[:enabled_checks].nil?
      mvc             = options[:mvc]             unless options[:mvc].nil?
      $path           = options[:path]            unless options[:path].nil?

      unless __valid?
        $logger.error "An invalid library it has been found. Please use --recovery flag to force fresh install from dawnscanner.org"
        return []
      end

      unless __load?
        $logger.error "The library must be consumed with dawnscanner up to v#{$descriptor["kb"]["api"]}. You are using dawnscanner v#{Dawn::VERSION}"
        return []
      end

      # TODO: untar and unzip from here (look for it in Google)
      if __packed?
        $logger.info "a packed knowledge base it has been found. Unpacking it"
        __unpack
      end

      enabled_checks.each do |d|

        dir = File.join($path, d)

        # Please note that if we enter in this branch, it means someone
        # tampered the KB between the previous __valid? check and this point.
        # Of course this is a very rare situation, but we must handle it.
        unless Dir.exists?(dir)
          $logger.critical "Missing check directory #{dir}"
          $logger.error "An invalid library it has been found. Please use --recovery flag to force fresh install from dawnscanner.org"
          return []
        end

        # Enumerate all YAML file in the give dir

      end

    end
Load security checks from db/ folder.

 options - The list of the options to be passed to KB. It can contain:
   + enabled_checks: an array of security checks that must be enabled
      [:generic_check, :code_quality, :bulletin, :code_style, :owasp_ror_cheatsheet, :owasp_top_10]
   + mvc: the mvc name for the target application, in order for the KB to
          deselect all security checks that don't fit the code to be
          reviewed.
   + path: the path for the KB root folder. Please note that #{Dir.pwd}/db
           is the default location.

 Returns an array of security checks, matching the mvc to be reviewed and
 the enabled check list or an empty array if an error occured.