Store passwords in your database as hashes, not as text
Your password database should store the result of a password-hashing function. Reversible encryption leaves a way back to the original password.
npm install --save-dev @sitecmd/cli
npx sitecmd audit .
The CLI runs on your computer or in your CI, and your code stays there.
What it finds on a demo project
The CLI flags code that writes a password field to the database with no apparent hashing call.
SiteCMD CLI 2.0.0
Demo project: Signup endpoint
npx sitecmd audit .
SiteCMD Code Scan - .
Checked: November 9, 2026
Framework: Express
Issues: 1 total | critical 0 | high 1 | medium 0 | low 0
High (1)
- [Security · security] Possible password write without visible hashing - src/routes/signup.js:13
Your code passes? Now watch your site.
Use password hashing instead of reversible encryption
Use a slow password-hashing library with a salt for each password. OWASP's password storage guide explains the choice.
Choose between bcrypt and Argon2id for password hashing
OWASP recommends Argon2id with at least 19 MiB of memory, 2 iterations and 1 degree of parallelism. For a legacy system using bcrypt, it recommends a work factor of at least 10 and a 72-byte password limit. Tune the work for your deployment rather than copying a library default.
Verify stored passwords through the hashing library
Use the library's password verification function during sign-in. Don't compare the submitted password directly with a stored string. OWASP's authentication guide covers password comparison.
Frequently asked questions
Can I use SHA-256 to hash passwords?
No. OWASP says fast hashes such as SHA-256 let attackers make large numbers of guesses quickly, and recommends a slow algorithm such as Argon2id, bcrypt or PBKDF2.
Carry password authentication into record-level permissions
Website security
Catch leaked API keys and exposed files before someone uses them against you.
JWT decode vs verify
Separate reading a token from deciding whether to trust its claims.
IDOR and tenant isolation
Look for app queries that trust an ID without checking who may use it.