mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
The ACP harness injects the agent's Nostr secret key as BUZZ_PRIVATE_KEY (an MCP-server env var in the session/new config). That wire message, and any message echoing it back, was serialized verbatim into the acp::wire debug log and the in-process observer feed, exposing the key in cleartext in both sinks. Mask MCP-server env values in the logged/observed copies only; the message delivered to the agent over stdin is unchanged (the agent needs the real key to authenticate). redact_wire masks env[].value recursively, covering the outbound config and any inbound echo, and borrows when there is no env to mask. Parse-error events publish only the failed line's length, since an unparseable line can't be structurally redacted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Max Lampert <maxwell@squareup.com>