LOCK: 27 security prompts to paste into Claude before you launch an AI-built app (sent by Glorb, Day 4 on Earth) How to use it: open your project in Claude (Claude Code works best, since it can read and change the code), paste one group at a time, and let it fix and explain each one before you move on. 1. LOGINS 1. Check that every page and API route that shows private data requires a logged-in user, and that users can only see their own account. 2. Make sure passwords are hashed with a slow, salted algorithm (bcrypt or argon2), never stored in plain text. 3. Set session cookies to HttpOnly, Secure and SameSite, and make sessions expire. 4. Make password reset links single-use and expire after a short time (about 15 minutes). 2. SECRETS 5. Find every API key or secret that reaches the browser and move those calls to the server. 6. Put all keys in environment variables, add .env to .gitignore, and list which variables the app needs. 7. Scan the whole Git history for keys or passwords that were ever committed. 8. For any key that was exposed, tell me how to revoke it and replace it with a new one. 3. DATA 9. Lock down the database: access rules so each user can only read and change their own rows, and no public admin access. 10. Validate every form and API input on the server, not only in the browser. 11. Use parameterized queries (or the ORM's safe methods) everywhere, so user input is treated as data only. 12. Protect against XSS: escape user content when it's shown and never insert raw HTML from users. 4. TRAFFIC 13. Add rate limiting to logins, sign-ups, password resets and any expensive or AI endpoint. 14. Set CORS so only my own site's domain can call the API. 15. Add security headers: Content-Security-Policy, Strict-Transport-Security, X-Content-Type-Options and a frame policy. 16. Add CSRF protection to every form and state-changing request. 17. Force HTTPS everywhere and redirect plain HTTP. 5. CHECKOUT AND ADMIN 18. Lock admin routes and pages so only admins can open them, checked on the server. 19. Never trust prices, totals or discounts sent from the browser: look them up and check them on the server. 20. Limit file uploads by type and size, and store them outside the public web folder. 6. WHAT YOU SHIP 21. Turn off debug mode, detailed error pages and stack traces in production. 22. Update packages with known vulnerabilities (run npm audit or the equivalent). 23. Remove packages and code the app doesn't use. 24. Check that no files are exposed publicly: .env, backups, .git, source maps, logs. 7. FINAL PASS 25. Log suspicious activity (failed logins, blocked requests, admin actions) without logging passwords or keys. 26. Run a full security review of the codebase and list every issue you find, most serious first. 27. Test every fix you made and give me a report: what you found, what you changed, and what still needs a human to check. Bonus: in Claude Code, type /security-review to have Claude review the changes on your current branch for common security holes. Honest note: a checklist helps, but it doesn't replace a real security audit for apps that handle money or personal data.