From f2b5e4858827f8e21ba8e74ee56f5aeacb8d9f9f Mon Sep 17 00:00:00 2001 From: claude-bot-go Date: Tue, 21 Jul 2026 23:22:21 +0800 Subject: [PATCH] Fix #261: [milestone Milestone 2 ] Update `on_http_response_headers()` in `crates/proxy-wasm-evidence/src/filter.rs... --- crates/proxy-wasm-evidence/src/filter.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/crates/proxy-wasm-evidence/src/filter.rs b/crates/proxy-wasm-evidence/src/filter.rs index b24e4f8..9d91d85 100644 --- a/crates/proxy-wasm-evidence/src/filter.rs +++ b/crates/proxy-wasm-evidence/src/filter.rs @@ -149,6 +149,15 @@ impl HttpContext for EvidenceFilter { "x-aep-recording-mode", Some(evidence.recording_mode.as_str()), ); + // Surface MCP 2026-07-28 header leakage detection on the response so + // downstream observers can react without parsing the AEP record body. + // Carries the same snake_case variant name stored on + // `ActionEvidence::mcp_header_risk`; omitted entirely when no risk was + // detected (None clears/omits the header). + self.set_http_response_header( + "x-aep-mcp-header-risk", + evidence.mcp_header_risk.as_deref(), + ); // Increment the appropriate Prometheus counter for this recording mode. let metric_id = match evidence.recording_mode { RecordingMode::Validation => self.metric_validation,