Usage of insufficient random value
- Rule ID: java_lang_insufficiently_random_values
- Languages: java
- Source: insufficiently_random_values.yml
Description
The use of predictable random values compromises application security, particularly when these values serve security-related functions.
Remediations
- Do utilize a robust library for generating random values to enhance security.
SecureRandom random = new SecureRandom();
References
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