Skip to content

docs: gaze report now redacts sensitive env-var values from surfaced adapter stderr #346

Open

Description

@jflowers

What changed

gaze (unbound-force/gaze#301) now scrubs sensitive inherited environment-variable values from AI-adapter stderr before surfacing that stderr in error messages. When gaze report --ai=... embeds child-process stderr (adapter failures and empty-output errors), values of env vars whose names contain KEY / TOKEN / SECRET / CONFIG_CONTENT (case-insensitive), or any inherited value 32+ bytes, are replaced with [REDACTED:<VAR>] markers before the 512-byte snippet is included.

Why it matters

This is defense-in-depth for the config-as-secret CI pattern used by the reusable gaze AI report workflow (unbound-force/gaze#300): the entire strict-JSON opencode config — including the literal apiKey — arrives as the single secret OPENCODE_CONFIG_CONTENT, and GitHub's automatic masking only registers the full JSON document, not embedded key fragments. If a pinned opencode-ai release ever echoed config fragments to stderr, the bare key could appear unmasked in CI logs; gaze now redacts it at the source.

Documentation updates in the gaze repo (already done)

  • docs/guides/ci-integration.md — new "Secret hygiene and stderr redaction" subsection: what triggers the scrub, the marker format, known limits (sub-threshold and transformed values), the second-secret platform-masking pattern (register the bare API key as its own secret referenced in an unused env var), and single-line strict-JSON secret guidance.
  • docs/guides/ai-reports.md — troubleshooting bullet for adapter stderr now notes the redaction markers.

Website impact to assess

If any website page documents gaze report error output, adapter troubleshooting, or CI secret handling with the reusable workflow, it may warrant a note that surfaced adapter stderr now carries [REDACTED:<VAR>] markers and that CI consumers are encouraged to register the bare API key as a second secret. No CLI commands, flags, or workflows changed.

Activity

  1. added 3 commits that reference this issue on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions