trackslash
VAULT-54 P2

Stop the keyboard learning from secret text fields

0
All issues

Description

Found in the VAULT-26 study: note bodies and other free-text fields use autocorrection and predictive text. What's typed there feeds the system keyboard's learned words, outside the vault.

What to change:

  • Audit every text input in the app, field by field.
  • Turn autocorrection and prediction off (.autocorrectionDisabled(), .textInputAutocapitalization, keyboardType, and UITextContentType where relevant) wherever the text is secret or identifying:
    • note bodies and titles
    • recovery phrase words
    • passphrases
    • killphrases
    • descriptions
  • Keep it on only where it's clearly harmless.
  • Password fields must stay secure entry.

Tests: a test or lint check listing each field's traits, so a new field can't silently default to learning.

Sub-issues

0

Linked issues

0

GitHub

0

No branches or pull requests linked.

Comments

1
Bradley

Fixed in https://github.com/badbundle/vault-app/pull/631 (merged as 3e1e45a4).

What changed:

  • Every text input now declares a SecretTextInput with .secretTextInput(_:), using the .prose or .verbatim preset or custom traits. It turns off autocorrection, which also stops predictive text and the keyboard's learned words, and turns off Writing Tools. It sets capitalization, and the ASCII keyboard where the text can only be ASCII.
  • LabeledTextField applies the declaration to its own input. A contrary modifier around a field can't turn learning back on, and a field without a declaration falls back to .verbatim.
  • No field kept learning on. Even tag names say what the vault holds.
  • No UITextContentType was added, so nothing invites AutoFill or iCloud Keychain. Password fields stay secure entry.

Tests:

  • SecretTextInputDeclarationTests scans every source file and fails, with path:line, for any TextField, SecureField, TextEditor or LabeledTextField without a declaration.
  • SecretTextInputTraitsTests checks the UIKit traits the keyboard actually sees.

The PR has the field-by-field table.