securesauce / precli

Precaution CLI - command line static application security testing tool
https://precli.readthedocs.io/
Other
13 stars 3 forks source link

Java Rule for PBEKeySpec where iterations less than 1000 #443

Open ericwb opened 3 months ago

ericwb commented 3 months ago

Is your feature request related to a problem? Please describe.

PBEKeySpec - use at least 1000 iterations to generate secure random keys

Describe the solution you'd like Detect case where Java crypto class PBEKeySpec is used with iterations less than 1000.

Describe alternatives you've considered n/a

Additional context

https://docs.oracle.com/en/java/javase/21/docs/api/java.base/javax/crypto/spec/PBEKeySpec.html#%3Cinit%3E(char%5B%5D,byte%5B%5D,int)

Love this idea? Give it a 👍. We prioritize fulfilling features with the most 👍.