Repository navigation
fix(secrets): strip control characters from secret input - #96444
Conversation
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Codex review: needs maintainer review before merge. Reviewed June 27, 2026, 2:37 PM ET / 18:37 UTC. Summary PR surface: Source +10, Tests +14. Total +24 across 4 files. Reproducibility: yes. from source inspection. Current main accepts C0/C1/DEL controls in both relevant normalizers because they pass the codePoint <= 0xff filter, and callers use those normalized values for provider credentials. Review metrics: none identified. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Next step before merge
Security Review detailsBest possible solution: Land this narrow normalization fix after normal maintainer merge gates; keep the companion masked-output PR separate because it owns diagnostic redaction rather than raw credential input. Do we have a high-confidence way to reproduce the issue? Yes from source inspection. Current main accepts C0/C1/DEL controls in both relevant normalizers because they pass the codePoint <= 0xff filter, and callers use those normalized values for provider credentials. Is this the best way to solve the issue? Yes. Updating both the exported core helper and the web-content private copy is the narrow maintainable fix for the observed runtime paths; extracting a new shared package boundary would be broader than this bug requires. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 98ed83f848de. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +10, Tests +14. Total +24 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review after applying the same C0/C1/DEL filtering to the web-content provider secret normalizer and adding env credential regression coverage. Targeted core/web-content tests, oxfmt, and diff check pass. |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review after adding the requested live proof for the web-content runtime credential path. The PR already included code/tests for the web-content provider secret normalizer. I re-ran the focused validation on the current branch and added a direct runtime probe for This covers the previously missing web-content runtime credential path while preserving ordinary internal spaces. |
|
@clawsweeper re-review No additional code changes appear necessary after the current head Fresh focused validation on the current PR head: Current PR checks include older cancelled duplicate |
) * fix(secrets): strip control characters from secret input * chore: retrigger PR checks * fix(web-content): strip controls from provider secrets --------- Co-authored-by: lin-hongkuan <[email protected]> (cherry picked from commit bc7f0f1)
) * fix(secrets): strip control characters from secret input * chore: retrigger PR checks * fix(web-content): strip controls from provider secrets --------- Co-authored-by: lin-hongkuan <[email protected]>
) * fix(secrets): strip control characters from secret input * chore: retrigger PR checks * fix(web-content): strip controls from provider secrets --------- Co-authored-by: lin-hongkuan <[email protected]>
) * fix(secrets): strip control characters from secret input * chore: retrigger PR checks * fix(web-content): strip controls from provider secrets --------- Co-authored-by: lin-hongkuan <[email protected]> (cherry picked from commit bc7f0f1)
What Problem This Solves
normalizeSecretInput()strips line breaks and non-Latin1 characters from copied credentials, but it still preserved other embedded terminal/header control characters such as NUL, TAB, DEL, and C1 controls. Those characters can still make downstream header construction fail or carry invisible garbage in configured secrets.Why This Change Was Made
The existing character filter now also drops C0/C1/DEL control characters while continuing to preserve printable Latin-1 and ordinary internal spaces. This keeps the documented
Bearer <token>style behavior intact.A focused regression test covers embedded controls and verifies ordinary spaces are still preserved.
User Impact
Copied API keys and tokens with hidden control characters normalize to usable values instead of failing later in provider request setup. Human-readable values with intentional spaces remain unchanged apart from edge trimming.
Evidence
Direct behavior probe:
Targeted test:
Formatting:
Whitespace:
AI-assisted
Prepared with Codex. I reviewed the change, understand the touched code path, and kept the PR focused on the bug described above.