fix(security): Ledger Live peer pin matches current metadata (#831) - #833
Open
graciangabriel8 wants to merge 3 commits into
Open
fix(security): Ledger Live peer pin matches current metadata (#831)#833graciangabriel8 wants to merge 3 commits into
graciangabriel8 wants to merge 3 commits into
Conversation
Real Ledger Live now advertises name "Ledger Wallet" and its sole icon
from avatars.githubusercontent.com, so the old exact-name + icon-host
checks failed on every genuine pairing. Re-scope the pin: `url` host
(ledger.com/subdomain, no empty-url exception) is now the load-bearing
anchor since all three fields are equally peer-self-reported; `name`
widens to a small allowlist ("Ledger Live", "Ledger Wallet") and stays
a warning contributor rather than a sole trigger; the icon-host check
is dropped since a GitHub avatar URL isn't a Ledger-controlled
identifier. Mismatch messages now name the exact field(s) that failed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
#831) Per PR #833 review: restore a narrow empty-url exception, but gate it on `name` already being allowlisted — the pre-#831 "mobile omits url" claim and a hard url requirement are both unevidenced, so this stays safe under either reading (no cry-wolf on mobile if the claim is true; no benefit-of-the-doubt for an unrecognized wallet if it's false). Mismatch messages distinguish "empty and untolerated" from "non-empty and wrong host". Also: drop the unevidenced "Ledger Live always advertises name and url" claim from the missing-metadata message; add near-miss url fixtures (evil-ledger.com, ledger.com.evil.tld) pinning the suffix-match property; invert the empty-url test to cover both directions of the narrowed contract; label the non-Ledger-url control test as a control, not a falsifier, in its title. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…bled reference Review nit: the comment said 'unrecognized' where the rule gates on the name being recognized — prose describing the opposite of the code beside it.
graciangabriel8
marked this pull request as ready for review
August 16, 2026 12:10
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.
The WalletConnect peer pin's
name(exact"Ledger Live") and icon-host (*.ledger.com) checks were failing on every genuine Ledger Live pairing — current Ledger Live advertises name"Ledger Wallet"and its sole icon fromavatars.githubusercontent.com, so onlyurlever passed. This re-scopes the pin sourlhost (ledger.com/subdomain) is the load-bearing anchor,namewidens to a small allowlist ("Ledger Live","Ledger Wallet") as a warning contributor rather than a sole trigger, and the icon-host check is dropped (a GitHub avatar URL isn't a Ledger-controlled identifier). Mismatch messages now name the exact field(s) that disagreed.Empty
urlis tolerated, but only whennameis already allowlisted. Neither the pre-#831 code's unevidenced "Ledger Live mobile sometimes omits url" claim nor a hard url requirement is something we could verify here, so this reading is safe under either: if the mobile claim is true, an unconditional url requirement would cry wolf on every mobile pairing (the #831 defect class); if it's false, gating the tolerance onnameOkmeans it buys nothing against the pin's actual threat (accidental wrong-wallet pairing) since a mis-scanned MetaMask isn't self-reported as "Ledger Wallet" either way.This is signing-path code and is not self-certified — it needs maintainer security review, in particular the empty-url tolerance and the icon check removal.
Closes #831