fix(security): require auth for key reveal and block screen capture o… - #62
Open
Letdown2491 wants to merge 1 commit into
Open
Letdown2491 wants to merge 1 commit into
Letdown2491 wants to merge 1 commit into
Conversation
…n key screens - Reveal Private Key no longer falls through to an unauthenticated reveal when device-credential auth is unavailable (no lock screen, or the androidx.biometric DEVICE_CREDENTIAL-only gap on API 28-29); it now requires BIOMETRIC_STRONG or DEVICE_CREDENTIAL and prompts the user to set up a screen lock otherwise - New SecureWindow composable sets FLAG_SECURE while in composition; applied to KeysScreen (nsec reveal) and AuthScreen (nsec entry) to block screenshots, screen recording, and recents thumbnails
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two security hardening fixes for screens that handle the private key:
Require authentication for "Reveal Private Key"
The Keys screen previously fell through to revealing the nsec without any authentication when
canAuthenticate(DEVICE_CREDENTIAL)didn't return success. That hits two real cases:DEVICE_CREDENTIAL-only prompts on those API levels (minSdk is 26)The reveal flow now checks and prompts with
BIOMETRIC_STRONG or DEVICE_CREDENTIAL, which:Block screen capture on key-exposing screens (FLAG_SECURE)
New
SecureWindow()composable setsFLAG_SECUREon the activity window while it's in composition and clears it on dispose. Applied to:This blocks screenshots, screen recording / media-projection capture, and the recents-screen thumbnail while key material can be on screen.