All rules →
Rules / JavaScript / TypeScript
SHIELD-JS-010

Insecure random number generation

mediumJavaScript / TypeScriptCWE-338CVSS 5.3

What it detects

Math.random() is not cryptographically secure and should not be used for security-sensitive operations.

How to fix

Use crypto.getRandomValues() or crypto.randomBytes() for security-sensitive randomness.

Scan your repo freeFull documentation
Back to all rules
SHIELD-JS-010: Insecure random number generation — Zennoxa Shield