Skip to content

Fix/212 215 security and vault issues - #334

Open
nedu-sol wants to merge 4 commits into
ethos-protocol:mainfrom
nedu-sol:fix/212-215-security-and-vault-issues
Open

Fix/212 215 security and vault issues#334
nedu-sol wants to merge 4 commits into
ethos-protocol:mainfrom
nedu-sol:fix/212-215-security-and-vault-issues

Conversation

@nedu-sol

Copy link
Copy Markdown

Summary
Addresses four Stellar-wave security/UX issues across both mobile clients:

#212 — Rate-limit recovery-code submission attempts. Reuses the escalating cooldown schedule from #119's OTPRateLimiter/TwoFactorViewModel (30s/60s/120s after 3/4/5+ failures) for the account-recovery flow. Surfaces remaining attempts/cooldown in the recovery UI and blocks submission while blocked.
#213 — Log passkey attestation format for support diagnostics. On registration failure, logs authenticator attachment type + WebAuthn attestation format (fmt) in memory, PII-scrubbed — never public key material, signatures, challenge bytes, or credential IDs. Scope documented in SECURITY.md.
#214 — Warn before sign-out on the last registered passkey device. Detects when the account has no other registered passkey and blocks sign-out behind a confirmation dialog. Added a minimal sign-out entry point to Android's vault list (it didn't have one) to host the same guard iOS already has.
#215 — Add a vault-creation confirmation step. Both platforms now show a review screen summarizing beneficiary address + TTL before POST /vaults fires.
Test plan
iOS: run AuthStoreRecoveryRateLimitTests, PasskeyDiagnosticsLoggerTests, AttestationFormatExtractionTests, AuthStoreLastRemainingPasskeyTests + AuthUITests/VaultUITests
Android: run RecoveryRateLimiterAndroidTest, PasskeyServiceTest, AuthViewModelTest + VaultListScreenTest
Manually verify recovery-code cooldown (3 wrong codes → 30s lockout) on both platforms
Manually verify sign-out warning appears only when the account has one passkey
Manually verify vault creation shows the review screen and Back/Cancel don't submit
Closes #212
Closes #213
Closes #214
Closes #215

Applies ethos-protocol#119's escalating OTP cooldown schedule (30s/60s/120s after
3/4/5+ failures) to the account-recovery flow on both platforms, since
a recovery backup code is just as brute-forceable as an OTP. Surfaces
remaining attempts/cooldown in the recovery UI and blocks submission
while a cooldown is active.

Closes ethos-protocol#212
Adds PII-scrubbed diagnostic logging (authenticator attachment type +
WebAuthn attestation statement format) for passkey registration
failures on both platforms, to help support triage device-specific
WebAuthn quirks. Never logs public key material, signatures, challenge
bytes, or credential IDs. Documents the scope in SECURITY.md.

Closes ethos-protocol#213
Detects when the account has no other registered passkey (via the
existing_credential_ids signal already used for excludeCredentials)
and blocks sign-out behind a confirmation dialog, since losing the
only passkey with no recovery in hand could permanently lock the user
out of a vault holding real funds. Adds a minimal sign-out entry point
to Android's vault list, matching the one already on iOS.

Closes ethos-protocol#214
Vault creation commits real funds to a TTL-gated structure, but both
platforms submitted straight from the input form. Adds a review step
summarizing the beneficiary address and check-in interval, requiring
explicit confirmation before the create-vault call fires. Adds tests
for the confirm/cancel paths on both platforms.

Closes ethos-protocol#215
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@nedu-sol Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant