fix(#3267): harden collapsed tool-preview secret filter (Codex gate MUST-FIX)

Codex regression gate found the exact-name hidden-key set leaked secret-shaped
args (apiKey/access_token/clientSecret/Authorization/cookie/...) into the
always-visible collapsed tool-card header. Replace with a normalized
case-insensitive _toolArgPreviewKeyIsHidden() predicate matching secret-bearing
substrings + camelCase variants. Adds 22 parametrized regression tests pinning
the secret-key denial + a legit-key-still-shown guard. Co-authored-by preserved.
This commit is contained in:
nesquena-hermes committed 2026-05-31 19:21:15 +00:00
1 parent 639a88e937
commit 1aed605fb6
3 files changed
+57 -3

No files matched your search

@@ -109,6 +109,8 @@ def test_rendered_apply_patch_tool_card_html_contains_diff_lines():
"_cliPatchSnippetFromArgs",
"_cliToolCardSnippet",
"_cliToolCardHasDiffSnippet",
"_toolArgPreviewValue",
"_toolArgPreviewKeyIsHidden",
"_formatToolArgPreview",
"_toolCardPreviewText",
"buildToolCard",