This file is indexed.

/usr/lib/ruby/vendor_ruby/chef_zero/endpoints/searches_endpoint.rb is in chef-zero 4.5.0-2.

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
require 'chef_zero/rest_base'

module ChefZero
  module Endpoints
    # /search
    class SearchesEndpoint < RestBase
      def get(request)
        # Get the result
        result_hash = {}
        indices = (%w(client environment node role) + data_store.list(request.rest_path[0..1] + ['data'])).sort
        indices.each do |index|
          result_hash[index] = build_uri(request.base_uri, request.rest_path + [index])
        end
        json_response(200, result_hash)
      end
    end
  end
end