CogniCrypt icon indicating copy to clipboard operation
CogniCrypt copied to clipboard

CrySL Rule for KeyGenParameterSpec

Open kruegers opened this issue 7 years ago • 1 comments

Look at the class KeyGenParameterSpec[1] and create a CrySL rule for it This article is a good starting point for a general overview: https://medium.com/@ericfu/securely-storing-secrets-in-an-android-application-501f030ae5a3

[1] https://developer.android.com/reference/android/security/keystore/KeyGenParameterSpec.html

kruegers avatar Dec 11 '17 12:12 kruegers

The name of this class in CrySL must be android.security.keystore.KeyGenParameterSpec.Builder. Without the Builder at the end. the set methods (e.g. setKeySize) throw an error (Couldn't resolve reference to JvmExecutable 'setKeySize'.) cause they are not in KeyGenParameterSpec class but in the builder. On the other hand, when using this class in a project, it will be imported as android.security.keystore.KeyGenParameterSpec, and when analysing by SAST it does not consider it as a used rule cause the rule SPEC name is, android.security.keystore.KeyGenParameterSpec.Builder.

shahrzadav avatar Sep 22 '21 12:09 shahrzadav