This file is indexed.

/usr/lib/ruby/vendor_ruby/chef_zero/endpoints/node_identifiers_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
19
20
21
22
require 'ffi_yajl'
require 'chef_zero/rest_base'
require 'uuidtools'

module ChefZero
  module Endpoints
    # /organizations/NAME/nodes/NAME/_identifiers
    class NodeIdentifiersEndpoint < RestBase
      def get(request)
        if get_data(request, request.rest_path[0..3])
          result = { 
            :id => UUIDTools::UUID.parse_raw(request.rest_path[0..4].to_s).to_s.gsub('-',''),
            :authz_id => '0'*32,
            :org_id => UUIDTools::UUID.parse_raw(request.rest_path[0..1].to_s).to_s.gsub('-','') }
          json_response(200, result)
        else
          raise RestErrorResponse.new(404, "Object not found: #{build_uri(request.base_uri, request.rest_path)}")
        end
      end
    end
  end
end