Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 rg or grep via Bash)
  • Glob tool for file discovery (NOT find or ls via Bash)
  • Read tool for file reading (NOT cat/head/tail via Bash)
  • Bash tool ONLY for: ast-grep (sg) commands, node scripts, npm audit

Available scripts (invoke via Bash):

  • scripts/analyze.js --target <path> --category <cat> — ast-grep scanner by vulnerability category
  • scripts/check_safety.js --target <domain> --platform <name> — Safe Harbor verification
  • scripts/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
  1. Read package.json — identify framework, dependencies, scripts
  2. Detect framework:
    • Express (express), Next.js (next), NestJS (@nestjs/core), Fastify (fastify)
    • Hono, Koa, Nuxt, SvelteKit, Remix, Astro
  3. Check TypeScript: presence of tsconfig.json
  4. Check monorepo: lerna.json, pnpm-workspace.yaml, turbo.json, nx.json
  5. 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:

  1. Phase 0: Run setup yourself (NOT delegated).
  2. Wave 1: Launch three Agent calls in parallel. Provide each with:
    • Full phase instructions for their assigned phases
    • Codebase path and detected framework from Phase 0
    • references/vulnerability-patterns.md for pattern matching
    • references/cwe-checklist.md for CWE mapping
  3. Wave 2: Launch report-writer with all findings + references/escalation-guide.md for chain identification.
  4. Output .js-audit/report.md path.

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):

  1. Express.js:

    • app\.(get|post|put|delete|patch|all|use)\(
    • router\.(get|post|put|delete|patch|all|use)\(
  2. 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
  3. NestJS:

    • @(Get|Post|Put|Delete|Patch|All)\( (route decorators)
    • @Controller\(, @Injectable\(
  4. Fastify:

    • fastify\.(get|post|put|delete|patch)\(
  5. User input sources (ALL frameworks):

    • req\.(body|query|params|headers|cookies|files|file)
Полный SKILL.md на GitHub

Установить js-code-analysis в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

install.shreferences/cwe-checklist.mdreferences/escalation-guide.mdreferences/h1-examples.mdreferences/patterns/command-injection.yamlreferences/patterns/idor.yamlreferences/patterns/nosql-injection.yamlreferences/patterns/prototype-pollution.yamlreferences/patterns/ssrf.yamlreferences/vulnerability-patterns.mdreferences/writeup-insights.mdscripts/analyze.jsscripts/check_safety.jsscripts/pattern_validator.js

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить js-code-analysis с