Fix ordinary prose redaction - #2359
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:or=delimiters before treating sensitive-looking prose terms as key/value assignmentsauth fixture,token validation, and stack-frameattext intactFixes #2137
Threat model
The previous heuristic accepted whitespace alone as proof that any word containing
auth,token,cookie,session, and related fragments introduced a secret. That over-redacted ordinary diagnostics and stack text without adding reliable secrecy: whitespace in prose does not establish a key/value boundary.This change narrows only that ambiguous fallback. Structured sensitive keys still redact through
redactJsonValue; header lines still redact by sensitive header name; query and URL policies remain unchanged; known provider-token shapes remain redacted; explicit sensitive assignments still require redaction; standaloneBearer <credential>remains protected; and artifact redaction still replaces configured secret names and values literally. Output truncation and deterministic ordering are unchanged.Gates
npm run test:redactionpassesnpx tsx scripts/playground-command-errors-smoke.tspasses every command-error/redaction assertion, then reaches the independent fixture-shape failure tracked in Playground command error smoke passes an incomplete runtime spec to bootstrapPhpCode #2358npm run test:artifact-redaction-integritypassesnpx tsx scripts/artifact-redaction-smoke.tspassesnpm run test:browser-routed-command-securitypassesnpm run test:production-boundary-enforcementpassesnpm run buildpassesnpm run checkpasses 70 commands through the repairedplayground-command-errors-smokeassertions, then stops at Playground command error smoke passes an incomplete runtime spec to bootstrapPhpCode #2358 (bootstrapPhpCodesmoke fixture lacks the current runtime-spec shape)git diff --checkpasses