React Router

Security scanning for React Router 7 apps

React Router 7 (the merge of Remix into RR) puts loaders and actions back on your server, which means the security model is now full-stack: same considerations as Remix on cookies, CORS, and CSP.

Most common issues

  1. 01Loaders that return sensitive data without auth checks
  2. 02Missing CSP/HSTS at the host layer
  3. 03Resource routes returning JSON without CORS allowlist

What SafeToShip checks for React Router

  • headers
  • js-secrets
  • cors
  • cookies
  • ssl
  • exposed-files

FAQ

Frequently asked questions

Are loader functions a security risk?
Loaders can return any data — including data the requesting user should not see. Always check authentication AND authorization in loaders. Same for actions.
Where does CSP go in React Router 7?
Set headers via the headers export on root.tsx or at your host (Netlify _headers, Vercel headers). For per-request nonces, generate in entry.server.tsx and pipe through context.

Run a React Router security scan

Free. 70+ checks. 60 seconds.