Insufficiently random value detected.

Description

Using predictable random values makes our application vulnerable to attacks, especially if these values are used for security purposes.

Remediations

✅ Use a stronger library when generating random values

SecureRandom random = new SecureRandom();

Resources

Associated CWE

OWASP Top 10

Configuration

To skip this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --skip-rule=java_lang_insufficiently_random_values

To run only this rule during a scan, use the following flag

bearer scan /path/to/your-project/ --only-rule=java_lang_insufficiently_random_values

Ready to take the next step? Learn more about Bearer Cloud.