Enhance best practices for preventing keyboard caching in sensitive text inputs#3573
Enhance best practices for preventing keyboard caching in sensitive text inputs#3573cpholguera wants to merge 2 commits intomasterfrom
Conversation
…ext inputs and update related documentation
There was a problem hiding this comment.
Pull request overview
This PR enhances iOS security documentation by expanding guidance on preventing keyboard caching of sensitive text inputs. It updates both the knowledge base article on keyboard caching and the best practices guide to provide comprehensive, security-focused recommendations.
- Expanded technical details about iOS keyboard caching mechanisms and forensic implications
- Documented the
UITextInputTraitsprotocol properties that control keyboard learning behavior - Established clear best practices for configuring text fields handling sensitive information
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| knowledge/ios/MASVS-STORAGE/MASTG-KNOW-0100.md | Enhanced documentation of iOS keyboard caching behavior with forensic context, detailed explanations of UITextInputTraits properties, and their security implications |
| best-practices/MASTG-BEST-0026.md | Converted from placeholder to complete best practice guide with specific configuration recommendations for preventing keyboard caching in sensitive text inputs |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
bernhste
left a comment
There was a problem hiding this comment.
I am aware that architecture and design were removed since V1. But data classification in this case seems important. I would at least mention it and refer to policies, etc.
| --- | ||
|
|
||
| Several options, such as autocorrect and spell check, are available to users to simplify keyboard input and are cached by default in `.dat` files in `/private/var/mobile/Library/Keyboard/` and its subdirectories. | ||
| Several features such as autocorrection, spell checking, and predictive suggestions help users enter text more quickly. On iOS, these features are backed by on-device keyboard dictionaries that are persisted in `.dat` files under `/private/var/mobile/Library/Keyboard/` and its subdirectories. Forensic analyses and security research show that user-typed terms, including previously unknown words, can appear in files such as `dynamic-text.dat` in this directory and may be recoverable during device analysis. |
There was a problem hiding this comment.
Are there sources we can link? For statements like that, we should add that.
Example I found:
| note: This topic explains best practices to prevent sensitive text inputs from being cached by the iOS keyboard. | ||
| --- | ||
|
|
||
| Sensitive text inputs should never participate in keyboard learning or prediction. On iOS, this means explicitly disabling features that allow the system keyboard to cache or reuse previously entered values. By default, standard text fields are eligible for caching unless told otherwise, which makes explicit configuration essential for any field that handles secrets or identifiers. |
There was a problem hiding this comment.
| Sensitive text inputs should never participate in keyboard learning or prediction. On iOS, this means explicitly disabling features that allow the system keyboard to cache or reuse previously entered values. By default, standard text fields are eligible for caching unless told otherwise, which makes explicit configuration essential for any field that handles secrets or identifiers. | |
| Sensitive text inputs should never participate in keyboard learning or prediction. What is defined as sensitve text, should be carefully evaluated for all text input based on data protection laws, industry regulations, company policies or individual assessment. | |
| On iOS, this means explicitly disabling features that allow the system keyboard to cache or reuse previously entered values. By default, standard text fields are eligible for caching unless told otherwise, which makes explicit configuration essential for any field that handles secrets or identifiers. |
Should we add a sentence about how to classify data first (data protection law, industry standard like PCI-DSS, etc.)?
Because this best practice should be applied to all text input and not just obvious ones like password forms. For example, an app for lawyers, or critical infrastructure can have many sensitive text input forms.
This PR enhances iOS security documentation by expanding guidance on preventing keyboard caching of sensitive text inputs. It updates both the knowledge base article on keyboard caching and the best practices guide to provide comprehensive, security-focused recommendations.
UITextInputTraitsproperties, and their security implications