+MASTG-BEST-0044 Mask Sensitive Data in Text Input Fields (iOS)

MASTG-BEST-0044 Mask Sensitive Data in Text Input Fields (iOS)

For any text input field that handles sensitive information such as passwords, PINs, or OTPs, ensure that the entered text is visually masked to prevent bystanders or screen capture tools from exposing it.

UIKit

Set isSecureTextEntry to true on any UITextField that captures sensitive data. This replaces typed characters with bullet characters (•) and prevents the text from appearing in plain text.

let passwordField = UITextField()
passwordField.isSecureTextEntry = true

SwiftUI

Use SecureField instead of TextField for any input that handles passwords, PINs, or OTPs. SecureField automatically masks its content as the user types.

SecureField("Password", text: $password)

Note

Do not use a plain TextField for sensitive input, even if you intend to style it to look like a masked field at the application layer, because this does not provide the same level of protection as the system-provided secure text entry mechanisms.

1. Panoramica

Titolo Standard

1.1 Riferimenti

1.2 Requisiti identificati

1.3 Regolamentazioni correlate

2. Requisiti identificati

Requisiti
Fonte Requisito

3. Regolamentazioni correlate

Regolamentazioni
Fonte Regolamentazione

Ticket collegati

  • OWASP -

    EN: Publications of the OWASP Foundation, https://owasp.org/. OWASP® is a registered trademark of the OWASP Foundation, Inc.; GRCA is not affiliated with, nor endorsed by, the OWASP Foundation. Only the versions published by OWASP are authoritative.

    DE: Veröffentlichungen der OWASP Foundation, https://owasp.org/. OWASP® ist eine eingetragene Marke der OWASP Foundation, Inc.; GRCA steht in keiner Verbindung zur OWASP Foundation und wird von ihr nicht unterstützt. Maßgeblich sind allein die von OWASP veröffentlichten Fassungen.