Plaintext password comparison (Python)
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 password field is compared with == against another value, indicating a plaintext password check instead of a constant-time hash verification.
Why it matters
A password compared with == in Python is a plaintext check against a stored value, which points to passwords being kept in recoverable form. If the datastore leaks, those credentials are exposed as-is and often reused elsewhere by the same users. This check flags the comparison pattern and cannot confirm the operand is plaintext, so treat it as a prompt to verify.
How to fix it
Hash passwords with bcrypt, argon2-cffi, or passlib and verify with the library's checker (bcrypt.checkpw, argon2 verify, or passlib CryptContext.verify), which is constant-time. Remove any == comparison of a raw password against stored data. Rehash legacy plaintext values at the user's next login.
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