Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
ECB encrypts each block independently, so identical plaintext blocks produce identical ciphertext blocks. It is deterministic and leaks structure/patterns of the plaintext (CWE-327). Cipher.getInstance("AES"), "DES", "DESede", or "Blowfish" with no mode specified silently falls back to ECB as well.
Use an authenticated mode: Cipher.getInstance("AES/GCM/NoPadding") with a unique 12-byte IV per message. At minimum use CBC with a random IV plus a separate HMAC (encrypt-then-MAC). Never use ECB or a bare cipher alias.
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.