Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
sugarforever avatar

Next.Js Security Scan

  • 473 installs
  • 130 repo stars
  • Updated June 19, 2026
  • sugarforever/01coder-agent-skills

next.js security scan is an agent skill that scans Next.js and TypeScript/JavaScript codebases for OWASP Top 10:2025 vulnerabilities, hardcoded secrets, dependency CVEs, and Next.js-specific misconfigurations for develop

About

next.js security scan is an agent skill from sugarforever/01coder-agent-skills that performs comprehensive security audits on Next.js and TypeScript/JavaScript projects before deployment. It supports quick, full, and targeted scan modes covering OWASP Top 10:2025 categories, XSS patterns, SQL/NoSQL/command injection, authentication flaws, cryptographic failures, and Next.js-specific issues in app/api routes, Server Actions, and middleware.ts files. The workflow maps project structure, runs dependency-audit.sh or npm audit --json, executes secret-scanner.py on source while skipping real .env files by default, and matches code against 5 reference pattern libraries including xss-patterns.md and nextjs-specific.md. Developers reach for next.js security scan during pre-deployment checks, security-focused code review, or CI/CD hardening when they need severity-ranked findings with file paths, code snippets, and remediation steps exportable to SARIF or JSON. Targeted flags include --xss, --injection, --auth, --secrets, --deps, and --nextjs for focused passes.

  • next.js security scan

Next.Js Security Scan by the numbers

  • 473 all-time installs (skills.sh)
  • +19 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Ranked #872 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/sugarforever/01coder-agent-skills --skill next.js-security-scan

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs473
repo stars130
Last updatedJune 19, 2026
Repositorysugarforever/01coder-agent-skills

How do you security scan a Next.js application?

Use next.js security scan for development tasks

Who is it for?

Next.js developers running pre-deployment security audits who need OWASP-aligned scanning with dependency CVE and secret detection in App and Pages routers.

Skip if: Python or non-Next.js backends without TypeScript/JavaScript frontend code, or teams that only need infrastructure penetration testing outside the codebase.

When should I use this skill?

User requests Next.js security audit, OWASP scan, secret scanning, dependency CVE check, or pre-deployment vulnerability review.

What you get

Severity-ranked security report with file paths, code snippets, risk explanations, remediation steps, and optional SARIF or JSON output.

  • Severity-ranked security report
  • SARIF or JSON export
  • Remediation recommendations per finding

By the numbers

  • Covers OWASP Top 10:2025 with 5 reference pattern libraries
  • Includes 3 automation scripts: dependency-audit.sh, secret-scanner.py, and pattern-scanner.py
  • Supports 6 targeted scan categories via CLI-style flags

Files

SKILL.mdMarkdownGitHub ↗

Next.js Security Scan Skill

This skill enables comprehensive security scanning of Next.js and TypeScript/JavaScript projects based on OWASP guidelines and industry best practices.

When to Use This Skill

  • Security audits of Next.js applications
  • Code review for security vulnerabilities
  • Pre-deployment security checks
  • Dependency vulnerability assessment
  • Detecting hardcoded secrets and credentials

Scan Types

1. Quick Scan

Fast scan focusing on critical vulnerabilities:

  • Hardcoded secrets and API keys
  • Dangerous function usage (dangerouslySetInnerHTML, eval)
  • Missing authentication in Server Actions
  • Known vulnerable dependencies

2. Full Scan

Comprehensive security assessment covering:

  • All OWASP Top 10:2025 categories
  • XSS vulnerability patterns
  • Injection vulnerabilities (SQL, NoSQL, Command)
  • Authentication and authorization flaws
  • Security misconfigurations
  • Cryptographic failures
  • Next.js-specific vulnerabilities
  • Dependency audit (CVE check)
  • Environment variable exposure

3. Targeted Scan

Focus on specific vulnerability categories:

  • --xss - Cross-site scripting patterns
  • --injection - SQL/NoSQL/Command injection
  • --auth - Authentication/authorization issues
  • --secrets - Hardcoded credentials
  • --deps - Dependency vulnerabilities
  • --nextjs - Next.js specific issues

Scan Procedure

Step 1: Project Discovery

1. Identify project type (Next.js App Router, Pages Router, or plain React) 2. Locate configuration files (next.config.js, package.json, .env*) 3. Map the codebase structure

Step 2: Dependency Audit

Run the dependency audit script:

./scripts/dependency-audit.sh

Or manually:

npm audit --json
# or
yarn audit --json

Step 3: Secret Scanning

Scan for hardcoded secrets:

python scripts/secret-scanner.py /path/to/project

Important: Environment File Handling

  • By default, real .env files are SKIPPED (.env, .env.local, .env.production, etc.)
  • These files contain actual secrets and should not be in version control
  • Only .env.example and .env.template files are analyzed for documentation quality
  • Use --include-env-files flag only if explicitly requested by user

The scanner will: 1. Scan source code for hardcoded secrets 2. Analyze .env.example templates to check:

  • Which sensitive variables are documented
  • Whether variables have descriptions (comments)
  • If placeholder values look like real secrets
  • Suggestions for missing common variables

Step 4: Pattern Analysis

For each file in the codebase, check against patterns in:

  • references/xss-patterns.md - XSS vulnerabilities
  • references/injection-patterns.md - Injection flaws
  • references/auth-vulnerabilities.md - Auth issues
  • references/nextjs-specific.md - Next.js vulnerabilities

Step 5: Report Generation

Generate a security report using:

  • assets/report-template.md - Report structure

Severity Classification

SeverityDescriptionAction Required
CRITICALExploitable vulnerability with severe impactImmediate fix required
HIGHSignificant security riskFix before deployment
MEDIUMPotential security issueFix in next release
LOWMinor security concernConsider fixing
INFOSecurity best practice suggestionOptional improvement

Key Files to Scan

Always Check

  • **/*.ts, **/*.tsx, **/*.js, **/*.jsx - Source code
  • next.config.js, next.config.mjs - Next.js configuration
  • package.json, package-lock.json - Dependencies
  • middleware.ts, middleware.js - Middleware security

Environment Files

  • .env.example, .env.template - SCAN for template analysis
  • .env, .env.local, .env.production - SKIP by default (contain real secrets)

Note: Real .env files should never be committed to version control. The scanner analyzes .env.example templates to ensure proper documentation of required variables.

High Priority Locations

  • app/api/**/* - API routes (App Router)
  • pages/api/**/* - API routes (Pages Router)
  • **/actions.ts, **/*-actions.ts - Server Actions
  • lib/auth*, utils/auth* - Authentication code
  • **/middleware.* - Middleware files

Output Format

Findings should be reported as:

[SEVERITY] Category: Description
  File: path/to/file.ts:lineNumber
  Code: <relevant code snippet>
  Risk: <explanation of the security risk>
  Fix: <recommended remediation>

Integration with CI/CD

This skill can generate output compatible with:

  • GitHub Security Advisories
  • SARIF format for GitHub Code Scanning
  • JSON for custom integrations

References

Load additional context as needed:

  • references/owasp-top-10.md - OWASP Top 10:2025 quick reference
  • references/xss-patterns.md - XSS detection patterns
  • references/injection-patterns.md - Injection vulnerability patterns
  • references/auth-vulnerabilities.md - Authentication security patterns
  • references/nextjs-specific.md - Next.js specific vulnerabilities and CVEs

Related skills

How it compares

Pick next.js security scan over generic SAST tools when you need Next.js App Router, Server Actions, and middleware-specific patterns alongside npm dependency CVE auditing.

FAQ

Does next.js security scan read real .env files?

next.js security scan skips real .env, .env.local, and .env.production files by default to avoid exposing live secrets. It analyzes .env.example templates unless the user explicitly passes --include-env-files.

What scan modes does next.js security scan support?

next.js security scan offers quick scans for critical issues, full OWASP Top 10:2025 assessments, and targeted scans via --xss, --injection, --auth, --secrets, --deps, and --nextjs flags.

Backend & APIsbackendintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.