Redact password in RPC URLs printed by network display.#2532
Merged
Conversation
leighmcculloch
approved these changes
Apr 30, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR prevents leaking RPC URL passwords in user-facing output by introducing a centralized redaction helper and using it in network display paths.
Changes:
- Add
redact_rpc_urlhelper and use it inNetwork’sDebugoutput. - Redact RPC URL passwords in
network ls -landdoctornetwork reporting output. - Add unit tests covering URL password redaction behavior.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| cmd/soroban-cli/src/config/network.rs | Adds redact_rpc_url and applies it to Network debug formatting; adds redaction-focused tests. |
| cmd/soroban-cli/src/commands/network/ls.rs | Uses redact_rpc_url in network ls -l output and adds an integration-style test ensuring no password is printed. |
| cmd/soroban-cli/src/commands/doctor.rs | Uses redact_rpc_url when printing/referencing network RPC URLs in doctor diagnostics. |
aa973fd to
9142fee
Compare
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.
What
Redact password in RPC URLs printed by network display.
Why
Close https://github.com/stellar/stellar-cli-internal/issues/76
Known limitations
N/A