From 943566bebd5465883fd5206d830f6c2f20105542 Mon Sep 17 00:00:00 2001 From: Stephen Waits Date: Sat, 21 Nov 2026 15:06:49 -0700 Subject: [PATCH] test(fuzz): the HTTP door fuzzer gives a tool call a request key, so a write tool is reached and not only refused Co-Authored-By: Claude Fable 5.2 --- fuzz/fuzz_targets/fuzz_http_mcp_request.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fuzz/fuzz_targets/fuzz_http_mcp_request.rs b/fuzz/fuzz_targets/fuzz_http_mcp_request.rs index 6ed94b22..8ecf7f2a 100644 --- a/fuzz/fuzz_targets/fuzz_http_mcp_request.rs +++ b/fuzz/fuzz_targets/fuzz_http_mcp_request.rs @@ -148,7 +148,13 @@ fuzz_target!(|r: Request| { .into_bytes() } Body::Call { tool, arguments } => { - let args = serde_json::from_str::(arguments).unwrap_or_default(); + let mut args = serde_json::from_str::(arguments).unwrap_or_default(); + // Every write needs a request key (D-88): without one the + // fuzzer would only ever meet the refusal, never the tool. + // This door's request count is unique for its book. + if let Some(a) = args.as_object_mut() { + a.entry("request_key").or_insert_with(|| format!("fuzz-key-{n:08}").into()); + } serde_json::json!({"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": TOOLS[*tool as usize % TOOLS.len()], "arguments": args}}) .to_string()