@@ -162,6 +162,12 @@ def raw_jsonrpc_status(method, params, label):
162162 return raw_http_status (label , request )
163163
164164results = {
165+ # The broad REST endpoint still permits requests outside the RPC route.
166+ "rest_route_allowed" : raw_http_status ("rest_route_allowed" , (
167+ f"POST /api/status HTTP/1.1\r \n "
168+ f"Host: { HOST } :{ PORT } \r \n "
169+ f"Content-Length: 0\r \n Connection: close\r \n \r \n "
170+ ).encode ()),
165171 # forward proxy — method-only allow rules
166172 "forward_method_initialize_allowed" : post_jsonrpc ("forward_method_initialize_allowed" , "initialize" , {"protocolVersion" : "2025-11-25" , "capabilities" : {}}),
167173 "forward_method_tools_list_allowed" : post_jsonrpc ("forward_method_tools_list_allowed" , "tools/list" ),
@@ -170,6 +176,7 @@ def raw_jsonrpc_status(method, params, label):
170176 "forward_method_tools_call_allowed" : post_jsonrpc ("forward_method_tools_call_allowed" , "tools/call" , {"name" : "read_status" }),
171177 "forward_method_tools_call_with_unmatched_params_allowed" : post_jsonrpc ("forward_method_tools_call_with_unmatched_params_allowed" , "tools/call" , {"name" : "blocked_action" , "arguments" : {"scope" : "ignored" }}),
172178 "forward_method_tools_delete_denied" : post_jsonrpc ("forward_method_tools_delete_denied" , "tools/delete" , {"name" : "purge_cache" }),
179+ "forward_unlisted_method_denied" : post_jsonrpc ("forward_unlisted_method_denied" , "admin.delete" ),
173180
174181 # forward proxy — batch: all requests allowed
175182 "forward_batch_all_allowed" : post_jsonrpc_batch ("forward_batch_all_allowed" , [
@@ -192,6 +199,7 @@ def raw_jsonrpc_status(method, params, label):
192199 "raw_method_tools_call_allowed" : raw_jsonrpc_status ("tools/call" , {"name" : "read_status" }, "raw_method_tools_call_allowed" ),
193200 "raw_method_tools_call_with_unmatched_params_allowed" : raw_jsonrpc_status ("tools/call" , {"name" : "blocked_action" , "arguments" : {"scope" : "ignored" }}, "raw_method_tools_call_with_unmatched_params_allowed" ),
194201 "raw_method_tools_delete_denied" : raw_jsonrpc_status ("tools/delete" , {"name" : "purge_cache" }, "raw_method_tools_delete_denied" ),
202+ "raw_unlisted_method_denied" : raw_jsonrpc_status ("admin.delete" , None , "raw_unlisted_method_denied" ),
195203}
196204results .update (DETAILS )
197205print (json .dumps (results , sort_keys = True ))
0 commit comments