Hardcoded initialization vector (IV)
Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
A cipher IV is a string/byte literal. A static IV reused across messages breaks the security of CBC/CTR/GCM modes.
Why it matters
A hardcoded IV means the same initialization vector is reused for every message under a key. In CTR and GCM that reuse is catastrophic: it can reveal plaintext and, for GCM, allow forgery. Even in CBC a fixed IV leaks whether two messages start the same.
How to fix it
Generate a fresh random IV/nonce for every encryption with a cryptographic RNG (crypto.randomBytes, os.urandom, SecureRandom), then prepend or store it next to the ciphertext so decryption can read it back. The IV does not need to be secret, only unique per message. Never derive it from a constant or a counter you reset.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo