You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: header_pattern.rb
    path of file: ./repos/wpscan/app/finders/plugins
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module WPScan
  module Finders
    module Plugins
      # Plugins finder from Dynamic Finder 'HeaderPattern'
      class HeaderPattern < Finders::DynamicFinder::WpItems::Finder
        DEFAULT_CONFIDENCE = 30

        # @param [ Hash ] opts
        #
        # @return [ Array<Plugin> ]
        def passive(opts = {})
          found = []
          headers = target.homepage_res.headers

          return found if headers.empty?

          DB::DynamicFinders::Plugin.passive_header_pattern_finder_configs.each do |slug, configs|
            configs.each do |kla
    
        def passive(opts = {})
          found = []
          headers = target.homepage_res.headers

          return found if headers.empty?

          DB::DynamicFinders::Plugin.passive_header_pattern_finder_configs.each do |slug, configs|
            configs.each do |klass, config|
              next unless headers[config['header']] && headers[config['header']].to_s =~ config['pattern']

              found << Model::Plugin.new(
                slug,
                target,
                opts.merge(found_by: found_by(klass), confidence: config['confidence'] || DEFAULT_CONFIDENCE)
              )
            end
          end

          found
        end