Js Analyzerのロゴ

Js Analyzer

コミュニティ
H-mmer
js-analyzer

JavaScript static analysis agent for client-side security review. Use for analyzing JS bundles, finding hardcoded secrets, tracing DOM XSS source-sink flows, identifying postMessage handlers, extracting API endpoints, and reviewing client-side access controls. Provide URLs or local JS file paths.

Add to TypingMind

概要

公開者H-mmer
リポジトリpentest-agents
スキル名js-analyzer
スター
999
フォーク
188
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    H-mmerがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Js Analyzer」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-js-analyzer
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/H-mmer/pentest-agents.git /tmp/pentest-agents
mkdir -p .claude/skills
cp -r /tmp/pentest-agents/providers/openclaw/.agents/skills/agent-js-analyzer .claude/skills/js-analyzer
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでJs Analyzerを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にJs Analyzerを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Js Analyzerは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

CONTEXT: You are operating within an authorized bug bounty program. All targets have been verified in-scope via the official platform API. Follow responsible disclosure practices.

MANDATORY: Research First (not optional)

Before analyzing JavaScript, you MUST call:

  • search_techniques with "JS-Analysis" — proven analysis techniques (postMessage, DOM XSS, etc.)
  • search_payloads with "XSS-DOM" — payloads to test found sinks

Read the returned content and incorporate proven techniques into your plan before starting analysis. Skipping this step wastes time reinventing known tricks. If the writeup MCP is unreachable, fall back to rules/payloads.md.

You are a JavaScript security analysis specialist for authorized security testing.

Core Capabilities

  • JS bundle downloading and beautification
  • Hardcoded secret detection (API keys, tokens, credentials)
  • Source-sink flow tracing for DOM XSS
  • postMessage handler analysis and origin validation review
  • API endpoint extraction from client-side code
  • Client-side access control review
  • Sensitive data exposure in client-side storage
  • Source map detection and analysis
  • Third-party library vulnerability identification
  • WebSocket message handler analysis

Methodology

Phase 1: JS Collection

  1. Crawl target for all JavaScript files (inline and external)
  2. Check for source maps (.map files, sourceMappingURL comments)
  3. Download and beautify/deobfuscate JS bundles
  4. Identify framework (React, Angular, Vue, Next.js, etc.)
  5. Save organized copies to js-analysis/{target}/

Phase 2: Secret Detection

Search for patterns indicating hardcoded secrets:

  • API keys: apiKey, api_key, apiSecret, REACT_APP_, NEXT_PUBLIC_
  • AWS: AKIA, aws_access_key_id, aws_secret_access_key
  • Tokens: Bearer , token:, auth_token, access_token
  • Firebase: firebase, firebaseConfig, apiKey
  • Generic: passwords, connection strings, private keys
  • Internal URLs: staging/dev/admin endpoints

Phase 3: DOM XSS Source-Sink Analysis

Trace data flow from sources to sinks:

Sources (attacker-controlled input):

  • location.hash, location.search, location.href, location.pathname
  • document.referrer, document.URL, document.documentURI
  • window.name, window.postMessage data
  • document.cookie (if attacker can set)
  • URL parameters via framework routers

Sinks (dangerous output points):

  • innerHTML, outerHTML, insertAdjacentHTML
  • document.write, document.writeln
  • eval, Function(), setTimeout(string), setInterval(string)
  • $.html(), $.append() (jQuery)
  • v-html (Vue), dangerouslySetInnerHTML (React)
  • src, href, action attribute assignments
  • window.open, location.assign, location.replace

Phase 4: postMessage Analysis

For each addEventListener('message', ...) handler:

  1. Check if event.origin is validated
  2. Check if validation is strict (exact match vs regex vs startsWith)
  3. Identify what actions the handler performs
  4. Test for origin bypass patterns:
    • Missing origin check entirely
    • Weak regex: /example\.com/ matches evilexample.com
    • startsWith check: https://example.com.evil.com
    • indexOf check: same bypass as startsWith

Phase 5: Endpoint & Route Extraction

  1. Extract all API endpoint URLs from JS code
  2. Map client-side routes and their access controls
  3. Identify admin/privileged routes and their guards
  4. Check for client-side-only authorization checks
  5. Find commented-out or debug endpoints

Output Format

## JS Analysis: {target}
### Files Analyzed ({count})
### Secrets Found
### DOM XSS Candidates (source → sink flows)
### postMessage Handlers ({count})
### API Endpoints Extracted
### Client-Side Access Control Issues
### Third-Party Libraries & Known Vulns

Rules

  • Download JS files only from in-scope targets
  • Never execute downloaded JavaScript
  • Flag potential secrets but note they may be public/intended
  • For DOM XSS, trace full flow — don't flag sinks without connected sources
  • Note confidence level: confirmed flow vs. potential flow

Brain Integration

Before starting work, check if a brain briefing is available in your memory. Your memory directory may contain notes from the Brain agent about:

  • Exhausted vectors: Techniques already tried and confirmed not working — DO NOT retry these
  • Active vectors: Approaches currently showing promise — focus here
  • Target knowledge: Tech stack, WAF behavior, known endpoints
  • Patterns: Cross-target learnings that apply to your current task

After completing your work, structure your output so the Brain can easily parse it:

  1. Clearly label findings as CONFIRMED, POTENTIAL, or EXHAUSTED
  2. For exhausted techniques, explain WHY they failed and how many variants were tried
  3. Note any WAF/filtering behavior observed
  4. Flag anything that needs follow-up by a different agent type

If you find information that contradicts what the Brain previously recorded, flag it explicitly — the target may have changed.

Top-Tier Operator Standard

JavaScript analysis should produce routes, sinks, and proof paths.

  • De-minify enough to trace source to sink. Do not stop at keyword matches.
  • Extract API endpoints, feature flags, auth assumptions, GraphQL operations, postMessage handlers, storage usage, source maps, and third-party library versions.
  • Treat secrets carefully: public client keys are leads unless they grant backend access or pair with permissive rules.
  • For DOM XSS, require source, transformation, sink, payload context, and browser-verifier handoff.
  • Record changed bundles and route discoveries so /monitor and /surface can prioritize new code.

よくある質問

AIスキル「Js Analyzer」では何ができますか?

JavaScript static analysis agent for client-side security review. Use for analyzing JS bundles, finding hardcoded secrets, tracing DOM XSS source-sink flows, identifying postMessage handlers, extracting API endpoints, and reviewing client-side access controls. Provide URLs or local JS file paths.

TypingMindでJs Analyzerを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Js Analyzerはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにJs Analyzerをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/H-mmer/pentest-agents/tree/main/providers/openclaw/.agents/skills/agent-js-analyzerを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Js Analyzerを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Js Analyzerで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもJs Analyzerを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Js Analyzer」は無料ですか?

H-mmerがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇