Authentication & sessions
- Use MFA and hash passwords with Argon2id.
- Set cookies with
HttpOnly; Secure; SameSite=Lax.
Input & output
- Use prepared statements to prevent SQL injection.
- Escape output by context to prevent XSS.
Recommended headers
Content-Security-Policy: default-src 'self'
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
Referrer-Policy: strict-origin-when-cross-origin