inspector/clients/cli/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 85e4a29990 fix: redact secrets nested inside metadata in servers/show
The redaction checked only top-level keys. That was sufficient while values
were strings — a secret could not hide beneath one — but #1910 lets a value be
an object, so `{ trace: { accessToken: "…" } }` printed in full: `trace` is not
sensitive, so the whole subtree went out with it. `servers/show` output is
meant to be safe to paste into an issue, so this is a regression this PR
introduced rather than a pre-existing gap.

`redactMetadataValue` walks the payload: a key matching `isSensitiveHeader`
replaces its entire value (so a sensitive key holding an object cannot leak
through its members either), anything else is descended into, and arrays are
mapped elementwise since objects inside them can carry sensitive keys.
Recursion is bounded — the payload came from `JSON.parse`, so it is a finite
tree with no cycles.

Tests cover a secret two levels under a non-sensitive key and one inside an
array element.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0177mPHAdECD18nLLCTwR5rh
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-23 14:03:40 -04:00
..
handlers fix: redact secrets nested inside metadata in servers/show 2026-08-23 14:03:40 -04:00
utils feat: port CLI, TUI, and launcher from v1.5 into v2 (#1452) 2026-06-14 20:27:49 -04:00
clear-stored-auth-for-relogin.ts CLI: catalog listing, auth flags, and OAuth browser UX (#1782) 2026-07-26 16:55:25 -04:00
cli-oauth-navigation.ts CLI: catalog listing, auth flags, and OAuth browser UX (#1782) 2026-07-26 16:55:25 -04:00
cli.ts feat: allow complex JSON values in request _meta 2026-08-23 12:23:40 -04:00
cliOAuth.ts CLI: catalog listing, auth flags, and OAuth browser UX (#1782) 2026-07-26 16:55:25 -04:00
error-handler.ts SDK v2 migration (behavior-neutral, versionNegotiation: 'legacy') (#1624) 2026-07-15 10:44:24 -04:00
index.ts feat(web): enforce localhost-only binding; expand loopback origin allow-list (#1796) 2026-07-26 22:15:10 -04:00
open-url.ts CLI: catalog listing, auth flags, and OAuth browser UX (#1782) 2026-07-26 16:55:25 -04:00
style.ts CLI: catalog listing, auth flags, and OAuth browser UX (#1782) 2026-07-26 16:55:25 -04:00