check-security

Audit Next.js API routes and server code for security vulnerabilities.

Updated Mar 24, 2026
One-click install
npx skills add https://github.com/SumitRajpal/nextjs-claude-architecture --skill check-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: check-security
Source: https://github.com/SumitRajpal/nextjs-claude-architecture/tree/main/.claude/skills/check-security
Command: npx skills add https://github.com/SumitRajpal/nextjs-claude-architecture --skill check-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scan Next.js API routes and server code for security vulnerabilities — authentication gaps, injection risks, secret exposure, and OWASP Top 10 concerns.

Core Features & Use Cases

  • Authentication gap checks across src/app/api/**/route.ts and related server logic to ensure proper auth enforcement.
  • Input validation assessment to detect unvalidated user input and unsafe usage of req.body.
  • Secrets exposure scanning, including env var leakage and sensitive data in logs.
  • XSS and CSRF risk identification with guidance on mitigation.
  • Dependency vulnerability detection guidance using npm audit and recommended remediation.
  • Produces actionable remediation guidance and prioritized fixes for development teams.

Quick Start

Run a full security audit of your Next.js project to identify authentication gaps, input validation issues, secrets exposure, and other OWASP Top 10 risks.

Frequently Asked Questions about check-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Next.js API routes for security vulnerabilities?

You can scan Next.js server code and API routes for security vulnerabilities by assessing authentication enforcement, input validation, secret exposure, and XSS risks. This audit produces structured findings with severity classifications and actionable remediation guidance for your development team.

What security issues should I check for in my Next.js server code?

You should check Next.js server code for authentication gaps, unvalidated user input, secrets exposure, XSS, CSRF, and dependency vulnerabilities. Assessing these areas ensures end-to-end security across data handling, authorization, and environment exposure.

How do I prevent environment variable leakage in Next.js API routes?

Prevent environment variable leakage in Next.js by scanning server code and API routes for secrets exposure, including sensitive data in logs. A security audit identifies these risks and provides remediation guidance to secure your environment variables and logging practices.

Does this security audit work with existing Next.js src/app/api route handlers?

Yes, this security audit applies to typical Next.js projects using src/app/api route handlers and related server logic. It assesses end-to-end security across authentication, authorization, data handling, and environment exposure within your existing project structure.

How do I detect dependency vulnerabilities in a Next.js project?

Detect dependency vulnerabilities in your Next.js project by running npm audit and applying recommended remediation. A full security audit integrates this detection to identify risks and produces prioritized fixes for development teams.

What is the best way to fix OWASP Top 10 risks in Next.js applications?

The best way to fix OWASP Top 10 risks in Next.js is to run a full security audit identifying injection risks, authentication gaps, and secret exposure. The audit generates prioritized, actionable remediation guidance for your development team to implement.