Standard random number generators do not provide a sufficient amount of entropy when used for security purposes. Attackers can brute force the output of pseudorandom number generators such as rand().If this random number is used where security is a concern, such as generating a session key or session identifier, use a trusted cryptographic random number generator instead. These can be found on the Windows platform in the CryptoAPI or in an open source library such as OpenSSL. In Java, use the SecureRandom object to ensure sufficient entropy.References: CWE/nDon't know how to fix this? Don't know why this was reported? Get Assistance from Veracode
https://github.com/julz0815/test-action/blob/2e095c0af94cd5465e33652501abb4ddbd188846/src/main/java/com/veracode/verademo/controller/ResetController.java#L151-L161
Filename: ResetController.java
Line: 156
CWE: 331 (Insufficient Entropy ('Cryptographic Issues'))
Standard random number generators do not provide a sufficient amount of entropy when used for security purposes. Attackers can brute force the output of pseudorandom number generators such as rand(). If this random number is used where security is a concern, such as generating a session key or session identifier, use a trusted cryptographic random number generator instead. These can be found on the Windows platform in the CryptoAPI or in an open source library such as OpenSSL. In Java, use the SecureRandom object to ensure sufficient entropy. References: CWE/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode