Skip to content

fix(security): harden browser IPC + extension consent/UX [v2.0]#52

Merged
pexatar merged 1 commit into
mainfrom
fix/2.0/ipc-security
Jun 9, 2026
Merged

fix(security): harden browser IPC + extension consent/UX [v2.0]#52
pexatar merged 1 commit into
mainfrom
fix/2.0/ipc-security

Conversation

@pexatar

@pexatar pexatar commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Cluster 6 — Browser IPC security (SEC-01/02/03) + extension enhancements

Chiude le 3 vulnerabilità IPC dell'audit esterno e include gli enhancement estensione, così la ri-pubblicazione sugli store avverrà una sola volta (Cluster 8 / T8.5).

⚠️ Questo merge non rilascia nulla agli utenti: il rilascio (tag Desktop + upload estensioni) resta a Cluster 8.

🔒 Security (SEC-01/02/03) — BrowserIpcService.cs, IpcModels.cs, 6× Resources.resw, estensioni

  • SEC-01: rimosso il fallback plaintext — ECDH obbligatorio, password sempre cifrata AES-GCM; senza sessione valida → ecdh-session-required.
  • SEC-02: la sessione è legata al clientId dell'handshake → niente riuso cross-client anche se il session id trapela.
  • SEC-03: consenso utente esplicito sul recupero password (dialog nativo, "Ricorda per questa sessione", reset al blocco del vault); consenso + sessioni ECDH azzerati al lock.
  • Hardening: throttling/lockout su unlock-vault + cap sul numero di sessioni ECDH concorrenti.

✨ Extension (Chrome + Firefox, 6 lingue)

  • T6.2: toast di successo autofill ("Credenziali inserite in {sito}").
  • T6.3: indicatore di stato connessione ("Connesso"/"Bloccato") nell'header del popup.
  • Consenso spostato fuori dall'apertura del popup (get-all-credentials non chiede più nulla); timeout per-azione (consenso/sblocco) per evitare falsi "PassKey non è in esecuzione".
  • Fix deadlock: il dialog di consenso leggeva un elemento WinUI fuori dal UI thread (RPC_E_WRONG_THREAD) → server IPC bloccato; ora lo stato della checkbox è catturato via eventi.

🧪 Verifica

  • Build Desktop 0/0, test 222/222.
  • Harness di sicurezza scripts/ipc-security-test.ps1 (Fase A/E) eseguito su build live: SEC-01/02/03 + LOCK = SECURE, happy-path consenso→decrypt OK.
  • Test funzionale reale (Chrome + Firefox, autofill su sito reale) superato — gate utente: VIA LIBERA dato.

⏭️ Follow-up

  • SEC-05 (process attestation) pianificata in Cluster 6.5: sostituto frictionless di SEC-03 (verifica del processo browser/BrowserHost invece del consenso). Quando pronta → rimuovere il dialog SEC-03 + la chiave resw orfana IpcConsentBodyAll.

🤖 Generated with Claude Code

Cluster 6 — closes the 3 IPC vulnerabilities (external audit) and bundles the
browser-extension enhancements so the extension is re-published only once.

Security (SEC-01/02/03) — BrowserIpcService + IpcModels + 6x resw + extensions:
- SEC-01: mandatory ECDH, no plaintext fallback (error 'ecdh-session-required').
- SEC-02: session bound to the handshake clientId (no cross-client reuse).
- SEC-03: explicit user consent on password retrieval ("remember for this
  session", reset on vault lock); consent + ECDH sessions cleared on lock.
- Hardening: unlock-vault rate-limit/lockout + cap on concurrent ECDH sessions.

Extension (Chrome + Firefox, 6 languages):
- T6.2 autofill success toast; T6.3 visible connection-status indicator.
- Consent moved off popup-open (get-all-credentials no longer prompts);
  per-action request timeouts (consent/unlock) avoid false "not running".
- Fixed an IPC deadlock: the consent dialog read a WinUI element off the UI
  thread (RPC_E_WRONG_THREAD) -> server hung; now captured via events.

Interim: SEC-03 consent is the stopgap; SEC-05 (process attestation) will
replace it frictionlessly (planned, Cluster 6.5).

Adds scripts/ipc-security-test.ps1 (named-pipe harness, checklist Fase A/E).
Build 0/0, tests 222/222, security harness all SECURE on a live build.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@pexatar pexatar merged commit 9ebaa01 into main Jun 9, 2026
1 check passed
@pexatar pexatar deleted the fix/2.0/ipc-security branch June 9, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant