The value check was anchored with ^, so "request failed: Authorization:
Bearer abc" passed through, as did ?access_token=... in a URL and email
addresses. The key deny-list also missed pwd/pass/auth/otp/pin.
Changes in src/platform/telemetry/redact-telemetry.ts:
- Bearer/Basic credentials and JWTs are masked wherever they occur; only
the match is replaced with [redacted], the rest of the message stays.
A JWT cut short still matches.
- URL query/fragment parameters (?, &, #) are masked when the name is a
secret key (isSecretTelemetryKey) or one of the URL-only names code,
key, sig. Non-secret parameters (limit, cursor, state) are kept.
- Email addresses are masked, including one cut in half by truncation.
- Keys: pwd, pass, auth, otp, pin match as whole key tokens (camelCase,
snake, kebab, PINCode split), so spinner/author/compass/isPinned are
kept; passcode and passphrase are added as fragments.
- Strings are truncated before the patterns run, so the scan is bounded
by maxStringLength. No regex lookbehind (Vite's default target includes
Safari 16.0).
Public exports and signatures are unchanged.
Pinned first (passed before and after): "keeps legitimate telemetry values
and innocent keys untouched" (enum codes, ULID/UUID/hex ids, route ids,
numbers, booleans, BASIC_PLAN, react@19.1.0, a URL without secrets,
code=... in prose, keys spinner/author/code/key).
RED before fix:
- "redacts the short secret key %s as a whole key token" (11 cases, key
kept)
- "redacts credentials in the middle of a string" (values unchanged)
- "masks secret URL query and fragment parameters" (tokens kept)
- "masks email addresses" (email kept)
- "does not leak a secret cut in half by truncation" (partial secrets kept)
Gates: check:architecture, check:types:app, check:types:test, lint,
test:component, check:release-coherence, test:platform pass. test:unit
passes except tests/unit/removal-fixture.test.ts, which needs generated
release evidence under artifacts/ that a fresh worktree does not have
(unrelated to this change).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>