React Security

React frontend security best practices for building secure, production-grade applications. Use when writing or reviewing security-sensitive React code, configuring authentication, handling user input, setting up CSP, securing Server Components/Actions, or hardening a React/Next.js application. Covers OWASP 2025, XSS prevention, CSRF, auth patterns, token storage, Server Components security (CVE-2025-55182), Next.js middleware/proxy hardening, supply chain security, CSP with Vite 6/Next.js 16, Zustand/ TanStack Query security, DOMPurify sanitization, and deployment hardening. Keywords: React security, XSS, CSRF, CSP, authentication, authorization, Server Actions, Server Components, OWASP, supply chain, npm audit, DOMPurify, Content-Security-Policy, HttpOnly cookies. (updated 2026-03-28)

mamamou Updated

File contents

mamamou/ai-coding-skills/tree/main/skills/react-security commit 1548f2d277

Frequently asked questions

npx skillmds@latest add mamamou/react-security