All rules →
Rules / Java
SHIELD-JAVA-015

Insecure Randomness for Security Tokens

mediumJavaCWE-330CVSS 6.5

What it detects

Using java.util.Random or Math.random to generate tokens or secrets yields predictable values.

How to fix

Use java.security.SecureRandom for tokens, session IDs, and any security-sensitive values.

Scan your repo freeFull documentation
Back to all rules
SHIELD-JAVA-015: Insecure Randomness for Security Tokens — Zennoxa Shield