All rules →
Rules / PHP
SHIELD-PHP-015

Insecure randomness for security tokens

mediumPHPCWE-338CVSS 6.5

What it detects

rand or mt_rand is used to generate a token or key, producing predictable values.

How to fix

Use random_bytes() or random_int() for cryptographically secure token generation.

Scan your repo freeFull documentation
Back to all rules
SHIELD-PHP-015: Insecure randomness for security tokens — Zennoxa Shield