This file is indexed.

/usr/lib/ruby/vendor_ruby/chef_zero/endpoints/file_store_file_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 'chef_zero/rest_base'

module ChefZero
  module Endpoints
    # The minimum amount of S3 necessary to support cookbook upload/download
    # /organizations/NAME/file_store/FILE
    class FileStoreFileEndpoint < RestBase
      def json_only
        false
      end

      def get(request)
        [200, {"Content-Type" => 'application/x-binary'}, get_data(request) ]
      end

      def put(request)
        data_store.set(request.rest_path, request.body, :create, :create_dir, :requestor => request.requestor)
        json_response(200, {})
      end
    end
  end
end