Skip to content

fix(onboarding): continuing without any unlock factor needs an explicit confirmation - #46

Merged
Henner4746 merged 1 commit into
mainfrom
fix/ohne-nachweis-ehrlich
Nov 30, 2026
Merged

Henner4746 merged 1 commit into
mainfrom
fix/ohne-nachweis-ehrlich

Conversation

@Henner4746

Copy link
Copy Markdown
Owner

Addresses SEC-H1 from the external security assessment of 16–23 Nov 2026: "Without an app password, the full identity and all messages can be reconstructed from the profile folder + keyring. Onboarding allows skipping the password even though the UI states it is required."

Confirmed

  • Without a factor, DeviceSecretStore keeps the 16-byte identity entropy (equivalent to the twelve words) in flutter_secure_storage, which on Linux is a plain libsecret item. The database key is derived from it on every open, so keyring entry plus bitdm.db is everything (vault_store.dart: no slots → basis.read()).
  • With a factor, the entropy is sealed in an AES-GCM slot (password: Argon2id) and removed from the keyring. That part is sound.
  • On the "Secure this device" screen, "Skip for now", "Continue", the Enter key and the back gesture all went straight on. The text said "Add at least one way to prove it is you before the app unlocks", which was never enforced. In Settings, "At least one factor stays required" was shown although the last factor can be removed.

Fix

  • All four ways off the screen go through _weiterNachSchutz: with no factor set up, a dialog "Continue without protection?" explains that the keys lie in this device's keychain, that BitDM opens without asking, and that anyone who can use the device, or copies its files with the keychain, can read every message and use the identity. Back stays on the screen; Continue without goes on.
  • secureSub and minOne (EN/DE) now say what is true.
  • The 19 existing UI tests that skip the screen confirm the new dialog.

Making a factor mandatory is a product decision and is not part of this PR.

Tests

test/oberflaeche/ohne_schutz_test.dart: "Skip for now" without a factor asks first, Back stays, "Continue" asks too and goes on after confirming; the back gesture asks; the texts no longer promise protection that does not exist. All three fail at origin/main, and pass on this branch.

Run in CT 107: flutter analyze shows only the 29 existing hints; test/oberflaeche, test/nah, test/lock: 537 green.

🤖 Generated with Claude Code

…it confirmation

Without a factor the identity entropy lies in the system keychain and BitDM
opens without asking: anyone who can use the device, or copies the profile
folder together with the keychain, can read every message and take over the
identity. "Skip for now", "Continue", the Enter key and the back gesture all
went past this silently, while the text said a factor was needed "before the
app unlocks" (security assessment 2026-11-23, SEC-H1).

- All four ways off the secure screen now ask "Continue without protection?"
  and explain the consequence when no factor is set up.
- secureSub and the settings line "At least one factor stays required" no
  longer promise protection that does not exist (the last factor can be
  removed).
- Existing UI tests confirm the new dialog.

Making a factor mandatory is left as a separate decision.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)
4.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Henner4746 added a commit that referenced this pull request Nov 30, 2026
…dialog

The tests from #41, #50 and #51 were written before #46 added the
"Continue without protection?" question, and the payment test pinned
schema 16, which #33 raised to 17 for group re-adds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Henner4746
Henner4746 merged commit 3a5cdb5 into main Nov 30, 2026
11 of 12 checks passed
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