Secrets & keys
Passwords hashed with a fast hash (MD5/SHA)secrets.weak-password-hash
MD5 and SHA-1/SHA-256 are built to be fast, so a leaked password table can be cracked at billions of guesses per second on one GPU. Most user passwords would fall within hours. Passwords need a slow, salted password hash.
- In force Rule secrets.weak-password-hash
- 3 clauses
At a glance
| Severity | high |
|---|---|
| Certainty | Observed — the code as written is the problem |
| Looks at | your source code |
| When it runs | Runs on every scan |
How to fix it
Use bcrypt, scrypt or Argon2: `const hash = await bcrypt.hash(password, 12)` to store and `await bcrypt.compare(password, hash)` to check. Re-hash existing users on their next successful login.
Check your own app
Run npx scanlyfix scan in your project. Every finding gets an id; after fixing, npx scanlyfix verify <id> proves it is gone.
If it is a false positive in your project, silence that one line with // scanlyfix-ignore-next-line secrets.weak-password-hash -- <why>.
Your code stays
on your machine
Only findings are uploaded, and only to your own dashboard.
ScanlyFix
Security, privacy pages, SEO and AI visibility checked in one scan, with fixes your AI editor can apply.
Home