Skip to content

Redact password in RPC URLs printed by network display.#2532

Merged
fnando merged 2 commits into
mainfrom
redact-rpc-url-network-display
Apr 30, 2026
Merged

Redact password in RPC URLs printed by network display.#2532
fnando merged 2 commits into
mainfrom
redact-rpc-url-network-display

Conversation

@fnando

@fnando fnando commented Apr 30, 2026

Copy link
Copy Markdown
Member

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

@fnando fnando requested a review from leighmcculloch April 30, 2026 00:02
@fnando fnando self-assigned this Apr 30, 2026
Copilot AI review requested due to automatic review settings April 30, 2026 00:02
@fnando fnando added this to DevX Apr 30, 2026
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Apr 30, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Apr 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_url helper and use it in Network’s Debug output.
  • Redact RPC URL passwords in network ls -l and doctor network 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.

Comment thread cmd/soroban-cli/src/config/network.rs
@fnando fnando force-pushed the redact-rpc-url-network-display branch from aa973fd to 9142fee Compare April 30, 2026 00:21
@fnando fnando enabled auto-merge (squash) April 30, 2026 00:22
@fnando fnando merged commit 313fbee into main Apr 30, 2026
211 checks passed
@fnando fnando deleted the redact-rpc-url-network-display branch April 30, 2026 00:40
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants