Skip to content

Redact secret-shaped values from agent logs and live observer feeds #31

Description

@jusso-dev

Parent: #21
Related: #20, #25, #27
Source: block/buzz#2869

Why this is valuable

Live agent activity, tool envelopes, errors, and debug logs can accidentally carry environment variables or credentials into UI, logs, traces, and test artifacts. Muster already needs safe previews; one central recursive redactor is a small, high-value hardening layer.

Bounded v1

  • Add one well-tested recursive redaction utility for maps, arrays, nested objects, env name/value pairs, headers, URLs with credentials, and common snake/camel-case secret keys.
  • Apply it before agent observer events, activity headlines, structured logs, error diagnostics, traces, and browser-visible run data leave their trust boundary.
  • Preserve execution payloads required by the runtime; scrub only copies destined for observation/logging and explicitly restricted projections.
  • Bound depth, item count, string length, and cyclic/unserialisable input behavior.
  • Emit a safe redaction marker without revealing the original value or secret length.

Acceptance criteria

  • API keys, tokens, passwords, cookies, authorisation headers, private keys, and env name/value pairs are redacted across observer/log surfaces.
  • Redaction handles nested arrays/maps, mixed casing, URLs, cycles, and oversized payloads safely.
  • Normal security evidence remains useful and is not globally replaced by blank output.
  • Runtime execution semantics are unchanged.
  • Structured logging tests prove raw secrets never reach captured output.
  • Browser/API tests prove unauthorised and authorised observer projections are both secret-safe.
  • Synthetic canary secrets are absent from generated logs, traces, screenshots, and test artifacts.

Effort guardrail

Central helper plus targeted call sites. Do not redesign encrypted evidence storage in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions