All rules →
Rules / Rust
SHIELD-RUST-010

Insecure randomness for security value

mediumRustCWE-338CVSS 5.9

What it detects

rand::random / thread_rng is not a CSPRNG guarantee for tokens, keys, or nonces.

How to fix

Use a CSPRNG (rand::rngs::OsRng / getrandom) for security-sensitive values.

Scan your repo freeFull documentation
Back to all rules
SHIELD-RUST-010: Insecure randomness for security value — Zennoxa Shield