Repository navigation
Stop domain commands from printing payment method ids - #18
Merged
Merged
Conversation
leak-check flagged paymentMethodId because the generated registrar client names that field. Those hits are property names with no card id. The check still fails on a value, an example, or any other payment-method spelling. Domain order JSON included the id the quote selected. Strip it before printing. Text output never showed it, and checkout still sends it to the API. Co-authored-by: Shayguun <shaygun@users.noreply.github.com>
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
mainis red on leak-check after #17. The check matchespaymentMethodIdin the generated registrar client. Every hit is a property name with no card id:--card)v1DomainOrderresponse field the CLI reads so checkout charges the card the quote was priced forThose names are required. The check is unchanged for every other hit: a value on the same line, an example, a comment,
renewalPaymentMethodId, orpayment_methodstill fails. There is no blanket allowlist.The real leak was in command output.
nr domain … --output jsonandnr domain order --output jsonmarshaled the whole order, including the card id the API returned. Text output did not print it, and nothing was written to config. JSON output now drops that field before printing. Checkout still sends the id to the API and does not echo it.Testing
go test -race -count=1 ./...go vet ./..../scripts/openapi-leak-check.sh