Security Hardening
Find common gaps in Next.js security before launch.
- OWASP
- Next.js
- Production
Install
npx skills add webrenew/skills --skill security-hardening2 files · 3,461 lines · any agent that reads SKILL.md
Use it when
- You prepare a production launch
- You add sign-in, API routes or Server Actions
- A client asks for an OWASP review
What your agent delivers
- Security headers and a Content Security Policy
- Checks for access control, input validation and rate limits
- A launch checklist mapped to the OWASP Top 10
Source files
Read every line before you install. Copy or download one file.
SKILL.md
34 lines
---
name: security-hardening
description: >
Find and fix common security gaps in Next.js apps. Use this skill for security
headers, authentication, authorization, Server Actions, API routes, validation,
rate limits, dependency checks, and OWASP reviews.
---
# Security Hardening
> Next.js security hardening, OWASP compliance, and production security checklist
## Metadata
- **Name**: security-hardening
- **Version**: 1.0.0
- **Author**: webrenew
- **Tags**: nextjs, security, owasp, csp, authentication, authorization, xss, csrf, headers
## When to Use
This skill should be used when:
- Hardening a Next.js application for production deployment
- Configuring security headers (CSP, HSTS, X-Frame-Options, Permissions-Policy)
- Implementing authentication and authorization (Auth.js, middleware, RBAC)
- Securing API routes and Server Actions (input validation, rate limiting, CORS)
- Preventing data exposure from Server Components to Client Components
- Setting up dependency security scanning (npm audit, Snyk, Dependabot)
- Reviewing OWASP Top 10 vulnerabilities specific to Next.js
- Configuring Vercel-specific security (Firewall, WAF, deployment protection)
## Summary
Comprehensive Next.js security hardening guide covering security headers and CSP with nonces, authentication patterns with Auth.js v5, authorization via Data Access Layer and middleware, Server Action security (CSRF, validation, rate limiting), API route protection, input validation with Zod, XSS and SQL injection prevention, environment variable management, data exposure prevention (server-only, taint API, DTOs), cookie security, middleware-based rate limiting and bot detection, secure error handling, dependency auditing, Vercel security features, OWASP Top 10 mapped to Next.js, and pre-deployment security checklists.
Related skills
All skills- 25
Merge every open dependency update in one branch and one review.
- 26
Launch Checklist
Launch packlaunch-site-checklist
Go live without losing leads or rankings to silent launch bugs.
Go live without losing leads or rankings to silent launch bugs.
- 01
Technical SEO
Growth & marketingseo-technical
Make each page clear to search engines. Give them a path to every link.
Make each page clear to search engines. Give them a path to every link.
- 02
Local SEO
Launch packGrowth & marketinglaunch-local-seo
Get found by customers nearby, in local search and on Google Maps.
Get found by customers nearby, in local search and on Google Maps.