All rules →
Rules / C/C++
SHIELD-CPP-021

Insecure random for security tokens

highC/C++CWE-338CVSS 7.5

What it detects

rand or random is not cryptographically secure and must not generate keys or tokens.

How to fix

Use a CSPRNG such as getrandom or RAND_bytes for security-sensitive values.

Scan your repo freeFull documentation
Back to all rules
SHIELD-CPP-021: Insecure random for security tokens — Zennoxa Shield