Usage of insufficient random value
- Rule ID: javascript_lang_insufficiently_random_values
- Languages: javascript
- Source: insufficiently_random_values.yml
Description
Using predictable random values compromises your application's security, particularly if these values serve security-related functions.
Remediations
- Do use a robust library for generating random values to enhance security.
const crypto = require('crypto');
crypto.randomBytes(16).toString('hex');
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=javascript_lang_insufficiently_random_values
To run only this rule during a scan, use the following flag
bearer scan /path/to/your-project/ --only-rule=javascript_lang_insufficiently_random_values