fix(suggestions): redact complete quoted credential values - #594
Conversation
tt-a1i
left a comment
There was a problem hiding this comment.
The new quoted-value branch still misses common punctuation boundaries and falls back to token redaction, which leaks part of a whitespace-containing credential into the model transcript. Please broaden the safe closing boundary and add punctuation regressions.
tt-a1i
left a comment
There was a problem hiding this comment.
审查提交:4fd50fee11628d48e2abf93662596d791c96c5f6。
需要修改后再合并。
具体问题
P1 — 带空格的引号凭据后接右括号或句点时仍泄露尾部 · extensions/suggestions/src/transcript.ts:79
Exact-head repro: password="north south") next=ok -> password=[REDACTED] south") next=ok; ] and . also leak. Existing review remains valid.
验证范围
18 transcript tests pass; 3 additional repros confirm leakage. repro.log/test.log
限制与后续
No live suggestion-model call.
tt-a1i
left a comment
There was a problem hiding this comment.
Re-reviewed 2c3c3ab. The reported quoted-credential leak before closing parentheses, brackets and periods is fixed, with regression coverage that also preserves masking of adjacent shell segments. All 38 transcript tests passed locally and current CI is green. This supersedes my previous request for changes.
Problem
The opt-in suggestion transcript redactor can retain a credential suffix when a labelled value contains quoted whitespace or punctuation. For example,
password="north south") next=visibleused to retainsouthin context sent to the suggestion model.Fixes #593.
Value
Standalone quoted labelled credentials are masked as complete values before next-action prediction. Ordinary adjacent text stays available, without claiming complete secret detection or general shell parsing.
Approach
),],.punctuation. Closing punctuation sequences must themselves end at a token boundary.password="north"."south"on the whole-token fallback; do not expose previously masked suffixes.Validation
Latest head:
2c3c3ab64165d4b89e82f23ba630dc9299f65fb5.bun run checkandgit diff --check: passed.All credentials in tests are synthetic. No live suggestion-model request was made.
Impact