This file is indexed.

/usr/lib/ruby/vendor_ruby/chef_compat/monkeypatches/chef/recipe.rb is in ruby-compat-resource 12.10.5-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
require 'chef/recipe'
require 'chef_compat/recipe'

class Chef::Recipe
  # If the cookbook depends on compat_resource, create a ChefCompat::Recipe object
  # instead of Chef::Recipe, for the extra goodies.
  def self.new(cookbook_name, recipe_name, run_context)
    if run_context &&
      cookbook_name &&
      recipe_name &&
      run_context.cookbook_collection &&
      run_context.cookbook_collection[cookbook_name] &&
      run_context.cookbook_collection[cookbook_name].metadata.dependencies.has_key?('compat_resource') &&
       self != ::ChefCompat::Recipe
      ::ChefCompat::Recipe.new(cookbook_name, recipe_name, run_context)
    else
      super
    end
  end
end