Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved critical redaction and secret-detection issues, plus error handling that can hide unrelated failures.
Review effort: Lite
Findings: 3
Open (4)
What changed in this PR
This PR prevents secret-shaped contract IDs and addresses from being echoed in errors or debug output while preserving useful alias diagnostics.
Changes:
- Adds secret-shape detection and conditional redaction.
- Updates contract and address resolution errors.
- Adds unit and integration coverage.
| File | Description |
|---|---|
cmd/soroban-cli/src/config/secret.rs |
Secret-shape detection and tests |
cmd/soroban-cli/src/config/sc_address.rs |
Conditional address error concealment |
cmd/soroban-cli/src/config/locator.rs |
Conditional contract error concealment |
cmd/soroban-cli/src/config/alias.rs |
Contract resolution and debug protection |
cmd/crates/soroban-test/tests/it/config.rs |
CLI integration tests |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
fnando
force-pushed
the
conceal-mistyped-secret-in-contract-id
branch
from
October 5, 2026 19:08
9de4fbf to
41babaa
Compare
fnando
force-pushed
the
conceal-mistyped-secret-in-contract-id
branch
from
October 5, 2026 19:58
41babaa to
e87b87b
Compare
fnando
force-pushed
the
conceal-mistyped-secret-in-contract-id
branch
from
October 5, 2026 21:06
e87b87b to
9cb45f5
Compare
fnando
force-pushed
the
conceal-mistyped-secret-in-contract-id
branch
from
October 6, 2026 17:21
9cb45f5 to
9dc38a9
Compare
leighmcculloch
approved these changes
Oct 7, 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.


What
Commands sharing
UnresolvedContract(--id/STELLAR_CONTRACT_ID) echoed the raw input in thecontract not found(and, for a seed phrase,Invalid name) error, leaking a secret key or seed phrase pasted there. The error now conceals secret-shaped input (customDebugtoo), while still naming a genuine alias typo so you can see which value was wrong. Same conditional naming extended to the address params from #2785.The contract-id counterpart to #2763 and #2785, which didn't cover this path.
Why
A secret is a bearer credential; a one-char typo still reveals effectively all of it. The new vector is
STELLAR_CONTRACT_ID, echoed without ever being typed. Detection is shape-based because a mistyped secret no longer parses.Known limitations
A 50+ char all-base32 alias starting with
S, or a 12+ word alias, is treated as secret-shaped and not named.