skills/nextjs-security-scan/SKILL.md
Comprehensive security vulnerability scanner for Next.js and TypeScript/JavaScript projects. Detects OWASP Top 10 vulnerabilities, XSS, injection flaws, authentication issues, hardcoded secrets, and Next.js-specific security problems. Audits dependencies for known CVEs and generates actionable security reports.
npx skillsauth add sugarforever/01coder-agent-skills Next.js Security ScanInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill enables comprehensive security scanning of Next.js and TypeScript/JavaScript projects based on OWASP guidelines and industry best practices.
Fast scan focusing on critical vulnerabilities:
dangerouslySetInnerHTML, eval)Comprehensive security assessment covering:
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 issuesnext.config.js, package.json, .env*)Run the dependency audit script:
./scripts/dependency-audit.sh
Or manually:
npm audit --json
# or
yarn audit --json
Scan for hardcoded secrets:
python scripts/secret-scanner.py /path/to/project
Important: Environment File Handling
.env files are SKIPPED (.env, .env.local, .env.production, etc.).env.example and .env.template files are analyzed for documentation quality--include-env-files flag only if explicitly requested by userThe scanner will:
.env.example templates to check:
For each file in the codebase, check against patterns in:
references/xss-patterns.md - XSS vulnerabilitiesreferences/injection-patterns.md - Injection flawsreferences/auth-vulnerabilities.md - Auth issuesreferences/nextjs-specific.md - Next.js vulnerabilitiesGenerate a security report using:
assets/report-template.md - Report structure| Severity | Description | Action Required | |----------|-------------|-----------------| | CRITICAL | Exploitable vulnerability with severe impact | Immediate fix required | | HIGH | Significant security risk | Fix before deployment | | MEDIUM | Potential security issue | Fix in next release | | LOW | Minor security concern | Consider fixing | | INFO | Security best practice suggestion | Optional improvement |
**/*.ts, **/*.tsx, **/*.js, **/*.jsx - Source codenext.config.js, next.config.mjs - Next.js configurationpackage.json, package-lock.json - Dependenciesmiddleware.ts, middleware.js - Middleware security.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.
app/api/**/* - API routes (App Router)pages/api/**/* - API routes (Pages Router)**/actions.ts, **/*-actions.ts - Server Actionslib/auth*, utils/auth* - Authentication code**/middleware.* - Middleware filesFindings 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>
This skill can generate output compatible with:
Load additional context as needed:
references/owasp-top-10.md - OWASP Top 10:2025 quick referencereferences/xss-patterns.md - XSS detection patternsreferences/injection-patterns.md - Injection vulnerability patternsreferences/auth-vulnerabilities.md - Authentication security patternsreferences/nextjs-specific.md - Next.js specific vulnerabilities and CVEsdevelopment
Review one completed Claude Code session and propose a skill to create, update, or reuse so similar work goes faster next time. Use when the user asks to "mine a session for skills", "what skill can be created or updated from the session where I…", "extract a skill from this chat", or to review a past session for reusable workflows. Operates on exported session markdown from claude-session-manager. Not for exporting/converting sessions (use claude-session-manager) and not for writing blogs or TODOs from sessions.
tools
Manage local Codex session transcripts, including listing candidate sessions, exporting full or selected sessions to organized Markdown, inspecting archived sessions, and summarizing tool-call history. Use when the user asks to scan, parse, archive, inspect, recover, summarize, manage, or convert Codex sessions, `~/.codex/sessions` data, `~/.codex/archived_sessions` data, `.jsonl` transcripts, tool-call history, or hard-to-read Codex conversation logs.
tools
Manage Claude Code session transcripts from local JSONL storage, including listing candidate sessions, exporting full or selected sessions to organized Markdown, inspecting archives, and summarizing tool-call history. Use when the user asks to scan, parse, archive, inspect, recover, summarize, manage, or convert Claude Code sessions, `~/.claude/projects` data, `.jsonl` transcripts, tool-call history, or hard-to-read Claude Code conversation logs.
testing
Apply the user's Chinese writing style when writing, translating, editing, proofreading, polishing, or publishing Chinese content, including blog posts, articles, subtitles, captions, tweets/X posts, threads, newsletters, and social posts. Enforce punctuation rules, especially Chinese curved quotes, halfwidth dash " - ", ASCII ellipsis "......", and no leftover fullwidth/English punctuation in Chinese body text.