feat(watchtower): cluster 4 — HIBP password breach detection [v2.0]#46
Merged
Conversation
…mity, opt-in) Add Have I Been Pwned compromised-password detection using the k-anonymity model: only the first 5 SHA-1 hex chars are sent, never the password. - IHibpService / HibpService: k-anonymity client, static HttpClient, 5s timeout - IWatchtowerScanService / WatchtowerScanService: orchestrator with 24h cache, 5 req/s throttle, UI-dispatched Progress/Completed events - Opt-in setting "Check for compromised passwords" in Settings → Security, persisted via SettingsService (HibpEnabled, LastHibpScanUtc) - Localized HIBP consent dialog (4 keys x 6 languages) - Refactor: merged standalone Watchtower into the Verifica page — "Password" and "Vault" tabs replace the separate Audit Vault tab and Watchtower nav entry; WatchtowerView/ViewModel removed - Dashboard: clickable "Salute del vault" card above the stat cards with Compromromise/Weak/Reused mini-counters, navigates to Verifica/Vault - Nav badge: red dot (CriticalDotInfoBadgeStyle) when compromised passwords exist - Privacy policy: new "Compromised Password Check" section documenting k-anonymity and the opt-in nature of the feature - 14 HibpService unit tests (k-anonymity, RFC 3174 vectors, network errors, cancellation) — full suite 213 green Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.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
Cluster 4 of the PassKey 2.0 plan — HIBP Watchtower: detect compromised passwords using the Have I Been Pwned Pwned Passwords API with the k-anonymity model (only the first 5 SHA-1 hex chars leave the device, never the password).
IHibpService/HibpService— k-anonymity client, staticHttpClientsingleton, 5s timeoutIWatchtowerScanService/WatchtowerScanService— scan orchestrator: 24h cache, 5 req/s throttle, UI-dispatchedProgress/CompletedeventsSettingsService(HibpEnabled,LastHibpScanUtc); localized consent dialog (4 keys × 6 languages)WatchtowerView/ViewModelremovedDeviation from plan
T4.4 originally specified a dedicated
WatchtowerView. Per user request during T4.GATE, Watchtower was instead merged into the existing Verifica page (T4.7 approach) to remove redundancy with the Audit Vault tab.Plan note
This PR targets
mainbut does not bump the version — the 2.0.0 bump and public release happen only in Cluster 8.Test plan
dotnet test— 213/213 green (14 newHibpServiceTests)🤖 Generated with Claude Code