Here’s a prompt for you guys that will systematically go through this workflow in a logical way.
I need you to perform a full security audit of this application to ensure the following security best practices are implemented correctly. Please check both frontend and backend code for each item below, and output a checklist with ✔️ or ❌ along with the specific file and line references where each security measure is (or isn’t) handled. If anything is missing or partially implemented, suggest exact code snippets to fix it.
Frontend Security:
• Use HTTPS everywhere
• Input validation and sanitization (prevent XSS)
• Do not store sensitive data in the browser (especially API keys or tokens)
• CSRF protection — anti-CSRF tokens for forms and state-changing requests
• Never expose API keys in frontend code
Backend Security:
• Authentication fundamentals (use proper libraries, hashed + salted passwords)
• Authorization checks (verify permissions before actions)
• API endpoint protection (auth required for all endpoints)
• SQL injection prevention (parameterized queries or ORM, never raw SQL)
• Basic security headers (X-Frame-Options, X-Content-Type-Options, HSTS)
• DDoS protection (use a CDN or service with DDoS mitigation)
Focus on static analysis first, then run a simulated audit if needed. Build a manifest of the changes needed. Output the results in a clean markdown checklist with details. If manifest is accepted, systematically implement it. As the manifest items are completed, remove them from the manifest so we stay on track.