mirror of
https://github.com/openai/codex.git
synced 2026-08-23 13:09:46 +00:00
## Why Bearer credentials can contain characters outside the previous token pattern or start with another recognized key prefix. This could leave part of the credential visible after redaction. ## What changed - Recognize bearer tokens containing URL-safe and base64-style characters, optional padding, and horizontal whitespace after the scheme. - Redact bearer credentials before matching narrower OpenAI and AWS key forms so the whole credential is replaced. - Preserve delimiters following the credential and avoid matching short tokens, joined scheme names, or tokens separated by vertical or non-ASCII whitespace. ## Testing Added focused positive and negative cases for the supported token forms and false-positive boundaries. GitOrigin-RevId: 1e5b10685281dc91d232d619b938bacbadaa47f9