security-audit

Audits Next.js and AI application codebases for vulnerabilities, secrets, and dependency CVEs.

1|Updated Apr 9, 2025
One-click install
npx skills add https://github.com/tbdavid2019/stockbot --skill security-audit-tbdavid2019
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: security-audit
Source: https://github.com/tbdavid2019/stockbot/tree/main/.agents/skills/security-audit
Command: npx skills add https://github.com/tbdavid2019/stockbot --skill security-audit-tbdavid2019

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Modern Next.js and AI-powered applications accumulate security risks across many layers—leaked secrets, SSRF-prone API routes, prompt injection vectors, unsafe HTML rendering, vulnerable dependencies, and missing security headers—and manual review of all of them is slow and error-prone. ## Core Features & Use Cases - Seven-Layer Audit Framework: Systematically covers secrets exposure, API/SSRF validation, prompt injection defenses, client-side XSS, dependency CVEs, HTTP security headers, and quantitative math safety. - Structured Reporting: Produces an executive summary, severity-categorized findings table with file references, and an actionable remediation plan. - Use Case: Before deploying a Next.js AI chatbot to production, run this audit to catch a hardcoded API key in git history, an unsanitized dangerouslySetInnerHTML usage, and a missing Content-Security-Policy header in one pass. ## Quick Start Run a full security audit of this codebase and report all critical and high severity findings with remediation steps.

Frequently Asked Questions about security-audit

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

FAQPage Schema
How do I audit a Next.js app for security vulnerabilities?▼

Run a layered review covering secrets in git history, API route input validation, SSRF in dynamic fetch calls, dependency CVEs via pnpm audit, and security headers in next.config.js. This skill automates that seven-layer checklist and outputs a severity-ranked report.

How to prevent prompt injection in LLM applications?▼

Wrap untrusted content like scraped HTML or parsed PDF text in explicit delimiter tags and add defensive system instructions. Also validate LLM tool-call arguments with schema validators such as Zod before executing any operations.

Does this audit check for leaked API keys and secrets?▼

Yes, it scans tracked files and git history for hardcoded API keys, bearer tokens, private IPs, and internal hostnames. It also verifies .gitignore rules cover .env files, .vercel, and PEM certificates.

What security headers should a Next.js app have?▼

Essential headers include Content-Security-Policy, X-Frame-Options, X-Content-Type-Options nosniff, Referrer-Policy, Permissions-Policy, and Strict-Transport-Security. The audit verifies these are configured in next.config.js along with scoped image remotePatterns.

Can this skill detect XSS risks in React markdown rendering?▼

Yes, it checks whether react-markdown enables raw HTML via rehype-raw without sanitization like DOMPurify or rehype-sanitize, and audits all occurrences of dangerouslySetInnerHTML in the codebase.