All rules →
Rules / Ruby
SHIELD-RUBY-020

Insecure randomness for tokens

mediumRubyCWE-330CVSS 6.5

What it detects

Using rand or Random for security tokens produces predictable values.

How to fix

Generate tokens with SecureRandom.hex or SecureRandom.uuid.

Scan your repo freeFull documentation
Back to all rules
SHIELD-RUBY-020: Insecure randomness for tokens — Zennoxa Shield