Repository navigation
fix(browser-pay): emit origin-only event URLs and sanitized refusal reasons - #1252
Merged
Merged
Conversation
…easons Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
BYWallace
marked this pull request as ready for review
October 20, 2026 22:42
Contributor
Author
There was a problem hiding this comment.
🔄 Devin is addressing Devin Review findings
Devin Review found 2 flags on 6e222e0. Devin is making a first pass at them and will update this comment once it's done.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… place - Cut event URLs to the origin inside emit() instead of at each call site, so no event can leave with a path, query, or held number. - Normalize refusal reasons once in decisionForOutcome and type them as the exported RefusalReason. - Drop the remote CDP error text in parseCdpMessage so it never reaches a caller. - Tidy the event-redaction tests: shared attach helper, reuse paymentIdempotencyKey, remove unreachable stub code, and split the combined error test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ratataque
approved these changes
Oct 20, 2026
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.
Primary change type
Problem and motivation
Interceptor events handed sensitive checkout data to every
handle.on()listener. An event'surlwas the full request URL with only the placeholder card number masked, so a URL likehttps://user:pass@shop.example/s/<session>/pay?token=…reached listeners as is, along with any logs they write. Refusal reasons from a custom relay, and some CDP and Node error messages, were passed through unfiltered too.Summary and scope
urlis now just the origin, for examplehttps://shop.example.unrecognized.refused.reasonis typed as the new exportedRefusalReason.The relay still gets the full request, and retries and idempotency keys work as before. Out of scope: backend, routing and other logging.
Related work
Related issue or discussion: N/A, requested directly by @BYWallace. Builds on #1237.
Validation
Tests and documentation
The new
interceptor.event-redaction.test.tsputs synthetic secrets in every part of the URL and checks that no event, log line or error contains them. It also checks that the relay still gets the original request. The README documents the newurlcontract and the known reasons.Compatibility and release impact
urlis origin-only, unknown refusal reasons becomeunrecognized,refused.reasonis typedRefusalReason, and CDP error messages are fixed strings.Security
will follow the
Security Policy for
private reporting.
AI assistance
Devin wrote the change and tests (session), and Claude Code did a cleanup pass. Both were checked with the commands under Validation.
Checklist
CONTRIBUTING.md, and this contribution follows the direct-PR or issue-first policy.any N/A checks above.