Why AI tools produce this: AI coding tools generate this anti-pattern by default, it appears in a large share of AI-written auth code.
Why this matters
These algorithms are designed to be fast, which makes offline brute-force and rainbow-table attacks cheap. They are NOT suitable for storing passwords.
Use a dedicated, slow password-hashing function with a per-password salt and a tunable work factor: bcrypt (bcrypt.hashpw), argon2 (argon2.PasswordHasher().hash), scrypt, or a wrapper such as passlib. These resist brute-force by design.
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.