jpskill.com
🛠️ 開発・MCP コミュニティ

security-analyzer

Comprehensive security vulnerability analysis for codebases and infrastructure. Scans dependencies (npm, pip, gem, go, cargo), containers (Docker, Kubernetes), cloud IaC (Terraform, CloudFormation), and detects secrets exposure. Fetches live CVE data from OSV.dev, calculates risk scores, and generates phased remediation plans with TDD validation tests. Use when users mention security scan, vulnerability, CVE, exploit, security audit, penetration test, OWASP, hardening, dependency audit, container security, or want to improve security posture.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o security-analyzer.zip https://jpskill.com/download/18096.zip && unzip -o security-analyzer.zip && rm security-analyzer.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/18096.zip -OutFile "$d\security-analyzer.zip"; Expand-Archive "$d\security-analyzer.zip" -DestinationPath $d -Force; ri "$d\security-analyzer.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して security-analyzer.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → security-analyzer フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
5

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

Security Analyzer

脆弱性のために環境を分析し、現在の CVE/エクスプロイトデータを取得し、TDD 検証による段階的な修復計画を生成します。

クイックスタート

ユーザーがセキュリティスキャンを要求した場合:

  1. 環境検出を実行します: python .claude/skills/security-analyzer/scripts/discover_env.py .
  2. 出力を inventory.json に保存します
  3. 脆弱性スキャンを実行します: python .claude/skills/security-analyzer/scripts/fetch_vulns.py inventory.json
  4. 出力を scan_results.json に保存します
  5. レポートを生成します: python .claude/skills/security-analyzer/scripts/generate_report.py scan_results.json inventory.json

ワークフロー

フェーズ 1: 環境検出

以下のために作業ディレクトリをスキャンします:

  • 依存関係: package.json, requirements.txt, Gemfile, go.mod, Cargo.toml, pom.xml
  • コンテナ: Dockerfile, docker-compose.yml, kubernetes/*.yaml
  • クラウド IaC: terraform/*.tf, cloudformation/*.yaml, *.bicep
  • シークレット: .env* ファイル (暴露リスクをフラグ付けし、値をログに記録しないでください)

検出スクリプトを実行します:

python .claude/skills/security-analyzer/scripts/discover_env.py /path/to/project > inventory.json

フェーズ 2: 脆弱性インテリジェンス

脆弱性スキャナーを使用して、現在の脅威データを取得します:

python .claude/skills/security-analyzer/scripts/fetch_vulns.py inventory.json > scan_results.json
ソース 優先度 用途
CISA KEV 1 積極的に悪用されている脆弱性 (WebSearch を使用)
NVD 2 CVE の詳細 + CVSS スコア (WebSearch を使用)
GitHub Advisories 3 パッケージ固有の脆弱性 (WebSearch を使用)
OSV.dev 4 オープンソースの脆弱性 (スクリプト内の API)

CISA KEV および追加のコンテキストについては、以下を補足してください:

WebSearch: "CVE-XXXX-YYYY CISA KEV exploit"

フェーズ 3: リスクスコアリング

スキャナーは以下を使用してリスクスコアを計算します:

Risk = (CVSS * 0.3) + (Exploitability * 0.3) + (Criticality * 0.2) + (Exposure * 0.2)

Exploitability: 10=CISA KEV, 7=public exploit, 3=theoretical
Criticality: 10=auth/payment, 5=core business, 2=logging
Exposure: 10=internet-facing, 5=internal, 2=air-gapped

フェーズ 4: 段階的な修復

修正コマンドと検証テストを含むレポートを生成します:

python .claude/skills/security-analyzer/scripts/generate_report.py scan_results.json inventory.json

各検出結果には以下が含まれます:

  1. 脆弱性の詳細 + リスクスコア
  2. 実際の修正コード/パッチ (単なる推奨事項ではありません)
  3. 修正前のテスト (脆弱性の存在を証明します)
  4. 修復ユニットテスト (修正コードをテストします)
  5. 修正後の検証 (脆弱性が解決されたことを証明します)

フェーズ 5: レポート

2 つのレポートを出力します:

  • security-report-technical.md — エンジニア向けの完全な詳細
  • security-report-executive.md — リーダーシップ向けの概要

出力構造については、references/report-templates.md を参照してください。

TDD パターン

脆弱性ごとに、3 種類のテストを生成します:

def test_vuln_exists():
    """修正前は PASS、修正後は FAIL"""
    assert is_vulnerable("component") == True

def test_fix_works():
    """修復コードのユニットテスト"""
    result = apply_fix(vulnerable_config)
    assert result.is_secure()

def test_vuln_resolved():
    """修正前は FAIL、修正後は PASS"""
    assert is_vulnerable("component") == False

検出結果別の修正タイプ

検出結果 出力
依存関係 CVE バージョンアップコマンド + lockfile の更新
コンテナの問題 Dockerfile パッチ
IaC の誤った構成 Terraform/K8s の修正
コードの脆弱性 ソースパッチ + テスト
シークレットの暴露 ローテーションコマンド + .gitignore の更新

相互作用の例

ユーザー: "このプロジェクトでセキュリティスキャンを実行してください"

Claude:

  1. 47 個の npm 依存関係、3 つの Dockerfile、2 つの Terraform 構成を検出します
  2. OSV.dev から現在の CVE データを取得します
  3. 12 個の脆弱性 (2 つがクリティカル、4 つが高、6 つが中) を特定します
  4. 段階的な修復計画を以下で生成します:
    • 実際の修正コマンド (npm install lodash@4.17.21)
    • IaC の誤った構成に対するコードパッチ
    • 各修正が機能することを証明する TDD テスト
  5. 技術レポートとエグゼクティブレポートを出力します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Security Analyzer

Analyze environments for vulnerabilities, fetch current CVE/exploit data, and generate phased remediation plans with TDD validation.

Quick Start

When the user requests a security scan:

  1. Run environment discovery: python .claude/skills/security-analyzer/scripts/discover_env.py .
  2. Save output to inventory.json
  3. Run vulnerability scan: python .claude/skills/security-analyzer/scripts/fetch_vulns.py inventory.json
  4. Save output to scan_results.json
  5. Generate reports: python .claude/skills/security-analyzer/scripts/generate_report.py scan_results.json inventory.json

Workflow

Phase 1: Environment Discovery

Scan working directory for:

  • Dependencies: package.json, requirements.txt, Gemfile, go.mod, Cargo.toml, pom.xml
  • Containers: Dockerfile, docker-compose.yml, kubernetes/*.yaml
  • Cloud IaC: terraform/*.tf, cloudformation/*.yaml, *.bicep
  • Secrets: .env* files (flag exposure risk, never log values)

Run the discovery script:

python .claude/skills/security-analyzer/scripts/discover_env.py /path/to/project > inventory.json

Phase 2: Vulnerability Intelligence

Fetch current threat data using the vulnerability scanner:

python .claude/skills/security-analyzer/scripts/fetch_vulns.py inventory.json > scan_results.json
Source Priority Use For
CISA KEV 1 Actively exploited vulns (use WebSearch)
NVD 2 CVE details + CVSS scores (use WebSearch)
GitHub Advisories 3 Package-specific vulns (use WebSearch)
OSV.dev 4 Open source vulns (API in script)

For CISA KEV and additional context, supplement with:

WebSearch: "CVE-XXXX-YYYY CISA KEV exploit"

Phase 3: Risk Scoring

The scanner calculates risk scores using:

Risk = (CVSS * 0.3) + (Exploitability * 0.3) + (Criticality * 0.2) + (Exposure * 0.2)

Exploitability: 10=CISA KEV, 7=public exploit, 3=theoretical
Criticality: 10=auth/payment, 5=core business, 2=logging
Exposure: 10=internet-facing, 5=internal, 2=air-gapped

Phase 4: Phased Remediation

Generate reports with fix commands and validation tests:

python .claude/skills/security-analyzer/scripts/generate_report.py scan_results.json inventory.json

Each finding includes:

  1. Vulnerability details + risk score
  2. Actual fix code/patch (not just recommendations)
  3. Pre-fix test (proves vuln exists)
  4. Remediation unit tests (tests the fix code)
  5. Post-fix validation (proves vuln resolved)

Phase 5: Reports

Output two reports:

  • security-report-technical.md — Full details for engineers
  • security-report-executive.md — Summary for leadership

See references/report-templates.md for output structure.

TDD Pattern

For each vulnerability, generate three test types:

def test_vuln_exists():
    """PASS before fix, FAIL after"""
    assert is_vulnerable("component") == True

def test_fix_works():
    """Unit test for remediation code"""
    result = apply_fix(vulnerable_config)
    assert result.is_secure()

def test_vuln_resolved():
    """FAIL before fix, PASS after"""
    assert is_vulnerable("component") == False

Fix Types by Finding

Finding Output
Dependency CVE Version bump command + lockfile update
Container issue Dockerfile patch
IaC misconfiguration Terraform/K8s fix
Code vulnerability Source patch + test
Secret exposure Rotation commands + .gitignore update

Example Interaction

User: "Run a security scan on this project"

Claude:

  1. Discovers 47 npm dependencies, 3 Dockerfiles, 2 Terraform configs
  2. Fetches current CVE data from OSV.dev
  3. Identifies 12 vulnerabilities (2 critical, 4 high, 6 medium)
  4. Generates phased remediation plan with:
    • Actual fix commands (npm install lodash@4.17.21)
    • Code patches for IaC misconfigurations
    • TDD tests proving each fix works
  5. Outputs technical and executive reports

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。