Details
Description
New rule to implement
s6288 should raise an issue on KeyGenParameterSpec.Builder when the call to setUserAuthenticationRequired set to true is missing or if setUserAuthenticationRequired is called but set to false:
val keyGenerator: KeyGenerator = var builder: KeyGenParameterSpec = KeyGenParameterSpec.Builder("test_secret_key", KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT) // Noncompliant .setBlockModes(KeyProperties.BLOCK_MODE_GCM) .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) .build()
var builder: KeyGenParameterSpec = KeyGenParameterSpec.Builder("test_secret_key", KeyProperties.PURPOSE_ENCRYPT or KeyProperties.PURPOSE_DECRYPT) // Noncompliant .setBlockModes(KeyProperties.BLOCK_MODE_GCM) .setEncryptionPaddings(KeyProperties.ENCRYPTION_PADDING_NONE) .setUserAuthenticationRequired(false) // Noncompliant secondary location .build()
Attachments
Issue Links
- implements
-
RSPEC-6288 Authorizing non-authenticated users to use keys in the Android KeyStore is security-sensitive
- Active