js-code-analysis
БесплатноЗапускает вложенные скриптыНе проверенSpecialized JavaScript/TypeScript static analysis for bug bounty hunting. Covers Node.js, Express.js, Next.js, NestJS, Fastify, and modern frameworks. Uses…
от mswell★ 74 звезды на GitHubОб этом скилле
JavaScript / TypeScript Bug Bounty Analysis Skill
Advanced static analysis of JS/TS codebases for high-severity vulnerabilities.
Rule #1: NO HALLUCINATION. Every finding MUST be backed by concrete code evidence (file path + line + snippet) and a clear, reproducible exploit path.
Rule #2: Taint Analysis is MANDATORY. Prove how user-controlled input (Source) reaches the dangerous function (Sink) without proper sanitization.
Rule #3: BRAIN DUMP MANDATE. Before listing vulnerabilities, document your reasoning, searches performed, dead ends, and false positive eliminations.
Rule #4: Use Claude Code tools. Prefer Grep tool over rg via Bash. Use Glob for file discovery. Reserve Bash for ast-grep (sg) and npm audit only.
Tool Usage
Subagents MUST use Claude Code's dedicated tools:
- Grep tool for all text/pattern searches (NOT
rgorgrepvia Bash) - Glob tool for file discovery (NOT
findorlsvia Bash) - Read tool for file reading (NOT
cat/head/tailvia Bash) - Bash tool ONLY for:
ast-grep(sg) commands,nodescripts,npm audit
Available scripts (invoke via Bash):
scripts/analyze.js --target <path> --category <cat>— ast-grep scanner by vulnerability categoryscripts/check_safety.js --target <domain> --platform <name>— Safe Harbor verificationscripts/pattern_validator.js --patterns-dir <dir> --fixtures-dir <dir>— validate ast-grep patterns
Directory Exclusions
ALL searches MUST exclude: node_modules/, dist/, build/, .next/, .nuxt/, coverage/, .git/, vendor/, __pycache__/, .cache/, .turbo/
Use Grep tool's glob parameter to filter (e.g., glob: "!node_modules/**"), or target specific source directories.
Phase 0: Setup & Detection
Goal: Prepare workspace, detect framework, check for exposed files.
mkdir -p .js-audit
- Read
package.json— identify framework, dependencies, scripts - Detect framework:
- Express (
express), Next.js (next), NestJS (@nestjs/core), Fastify (fastify) - Hono, Koa, Nuxt, SvelteKit, Remix, Astro
- Express (
- Check TypeScript: presence of
tsconfig.json - Check monorepo:
lerna.json,pnpm-workspace.yaml,turbo.json,nx.json - Exposed sensitive files (use Glob):
.env*,*.pem,*.key,firebase*.json,serviceAccount*.json,google-services.json- Flag any NOT listed in
.gitignore
Subagent Orchestration
Delegate to 3 parallel subagents, then compile report.
Wave 1 (PARALLEL — launch all three in a single message):
├── js-security-expert agent → Phases 1 + 2 + 3 (Recon + Frontend + Auth/Session)
├── api-security agent → Phases 4 + 5 (Dangerous Sinks + Injection Flaws)
└── webapp-security agent → Phase 6 (Logic, DOM XSS, File Upload, Config)
Wave 2 (SEQUENTIAL — after Wave 1 completes):
└── report-writer agent → Phase 7: Taint validation + compile .js-audit/report.md
Steps:
- Phase 0: Run setup yourself (NOT delegated).
- Wave 1: Launch three
Agentcalls in parallel. Provide each with:- Full phase instructions for their assigned phases
- Codebase path and detected framework from Phase 0
references/vulnerability-patterns.mdfor pattern matchingreferences/cwe-checklist.mdfor CWE mapping
- Wave 2: Launch
report-writerwith all findings +references/escalation-guide.mdfor chain identification. - Output
.js-audit/report.mdpath.
Workflow Overview
Phase 1: Recon & Routing → Routes, endpoints, Server Actions, middleware chain
Phase 2: Frontend-to-Backend → SSRF vectors, postMessage, WebSocket, CORS, state encoding
Phase 3: Auth & Session → JWT, OAuth2, CSRF, cookies, session, IDOR, rate limiting
Phase 4: Dangerous Sinks → RCE, SSRF, SSTI, Deserialization, Path Traversal
Phase 5: Injection Flaws → SQLi, NoSQLi, GraphQL, ReDoS, SSR XSS
Phase 6: Logic & Client-side → Prototype Pollution, Mass Assignment, DOM XSS, File Upload, Config
Phase 7: Taint & Report → Source-to-Sink validation + report generation
Phase 1: Recon & Routing (Attack Surface Mapping)
Goal: Identify where user input enters the application (Sources).
Search patterns (use Grep tool, targeting source directories only):
Express.js:
app\.(get|post|put|delete|patch|all|use)\(router\.(get|post|put|delete|patch|all|use)\(
Next.js (Pages Router + App Router + Server Actions):
export (async )?function (GET|POST|PUT|DELETE|PATCH)(App Router)export default function handler(Pages Router)"use server"(Server Actions)getServerSideProps,getStaticProps
NestJS:
@(Get|Post|Put|Delete|Patch|All)\((route decorators)@Controller\(,@Injectable\(
Fastify:
fastify\.(get|post|put|delete|patch)\(
User input sources (ALL frameworks):
req\.(body|query|params|headers|cookies|files|file)
Установить js-code-analysis в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл js-code-analysis?
Specialized JavaScript/TypeScript static analysis for bug bounty hunting. Covers Node.js, Express.js, Next.js, NestJS, Fastify, and modern frameworks. Uses AST-grep and Grep tool to find high-impact vulnerabilities (RCE, SSRF, SQLi, SSTI, Prototype Pollution, JWT, DOM XSS, GraphQL, ReDoS, CORS, CSRF) via strict Source-to-Sink Taint Analysis. Every finding MUST have concrete evidence.
Как установить скилл js-code-analysis?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл js-code-analysis запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic