• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialsecurity

42crunch-scan

プラグイン
42crunch-api-security-testing
ソース
GitHub で見る ↗
説明

42Crunchのライブコンフォーマンス・認可スキャン(APIが標準仕様に準拠し、適切にアクセス制御できているかを調べるテスト)をAPIに対して実行し、SQG-blocking(スキャン結果として報告されるセキュリティ上の重大問題)の検出結果を修正します。 **次のような場合に使用:** - ユーザーがコンフォーマンステスト、認可スキャン、BOLA(権限なしでアクセスできる脆弱性)テスト、BFLA(ユーザーに許可されていない操作ができる脆弱性)テスト、スキャン設定の生成・調整、またはスキャンで報告された問題の修正を実行したい場合 「スキャンを実行」「スキャンのみ」「コンフォーマンステスト」「BOLAテスト」「BFLAテスト」「42crunchスキャン」「スキャン設定」、またはライブAPIテストに特化したリクエスト(静的監査を除く)など、これらのフレーズが含まれるときに自動的に起動します。 ユーザーが監査とスキャンの両方を一緒に実行したい場合は、42crunch-api-security-testingスキルを使用してください。

原文を表示

Run a 42Crunch live conformance and authorization scan against an API and fix SQG-blocking scan findings. Use this skill whenever the user wants to run a conformance test, authorization scan, BOLA test, BFLA test, generate or configure a scan config, or fix scan-reported issues. Triggers on phrases like "run scan", "scan only", "conformance test", "BOLA test", "BFLA test", "42crunch scan", "scan config", or any request focused on live API testing without running a static audit. Use 42crunch-api-security-testing when the user wants both audit and scan together.

ユースケース
  • APIが標準仕様に準拠しているか調べる
  • APIのアクセス制御が適切か検査する
  • BOLAテストを実行する
  • BFLAテストを実行する
  • スキャン結果の重大問題を修正する
本文(日本語訳)

42Crunch Scan スキル

単一フェーズを実行します:Scan(スキャン)(実際の動作確認と認可テスト、およびセキュリティ品質ゲート(基準を満たしているかの確認)に対応する修正ループ)。実行前に明示的なユーザー許可が必要です。

静的監査は実行しません — 静的監査には 42crunch-audit スキルを使用してください。

OAS(OpenAPI仕様)ファイルが既に監査済みの状態(またはユーザーが明示的にスキャンのみを実行)であることを前提としています。スキャン前に監査上の問題が報告された場合は、先に 42crunch-audit の実行を提案してください。


エントリーポイント

  1. 事前確認チェック。 ../../references/pre-flight.md を読み、すべてのステップ(セットアップ、OAS解決、タグ検出)を完了してください。OASファイル選択をユーザーに促す際は、コンテキストに "scan" を使用してください(例:「どのファイルをスキャンしますか?」)。いずれかのステップが失敗またはユーザーがキャンセルした場合は、先に進まないでください。

  2. スキャン対象URLを特定する。

    OASファイルから servers[0].url を読み込みます。

    • SCAN42C_HOST 環境変数が設定されている場合 → 静かに次を通知します:

      「SCAN42C_HOST からスキャン対象を使用します:<url>」 これを SCAN_TARGET_URL として保存して進めます。

    • 設定されていない場合 → AskUserQuestion を呼び出します:
      • 質問: 「OASが API の対象を <servers[0].url> として指しています。これはスキャン対象として正しい URL ですか?」 — 選択肢:["はい、この URL を使用します", "いいえ、別の URL を指定します"]
      • いいえ を選んだ場合 → ユーザーに URL の入力を求め、SCAN_TARGET_URL として保存します。
      • はい を選んだ場合 → servers[0].url を SCAN_TARGET_URL として保存します。
  3. スキャンプレビュー用の OAS 分析 — 許可を求める前に静かに実行します。

    OASファイルを読み込み、以下を収集します:

    • 合計オペレーション数
    • securitySchemes からの認可スキーム種別(Bearer/JWT、APIキー、Basic、OAuth2)
    • BOLA(認可を適切に検証していない脆弱性)候補数:クライアントが指定した ID/キー/参照による特定の既存リソースを参照するオペレーション — パスパラメータ({…Id}、{…Key}、{…Ref})、クエリパラメータ(?orderId=)、またはリクエストボディフィールド(POST /lookup {orderId}、POST /transfer {fromAccountId, toAccountId})で指定。メソッドは候補判定に影響しません。純粋な一覧取得またはリソース新規作成のみ除外
    • OASがサンプルデータを含むかどうか:リクエストボディまたはパラメータスキーマに example、examples、または default 値を持つオペレーションが存在するか

    これらの結果を保持します — scan-workflow.md がこれを認可設定、テストデータ、分類ステップで再利用し、OASを再読み込みしません。

  4. スキャン設定の許可を求めます。 次のスキャンプレビューをチャットメッセージとして先に出力します:

    スキャン設定の準備はできていますか?
      対象:        <SCAN_TARGET_URL>
      OAS:         <ファイル名>(<N> オペレーション)
      認可:        <スキーム種別>  [+ 追加ユーザーが必要 — <N> BOLA 候補]
      サンプル:    OAS にサンプルデータあり  /  サンプルなし — テストデータが必要
      タグ:        <カテゴリー>:<タグ名>           ← プラットフォームモードのみ、タグ割り当て時;タグなしの場合は省略
      モード:      プラットフォーム / トークン
    

    次に AskUserQuestion を呼び出します:

    • 質問: 「スキャン設定を開始する準備ができました。認証情報、オペレーション分類、テストシナリオをお伺いしてから、本スキャン前に基本的な動作検証を実行します。進めてよろしいですか?」
    • 選択肢: ["はい、設定を始めてください", "いいえ、キャンセルします"]
  5. スキャンを実行します。 モードは事前確認時に既に特定されています — 再度導出しないでください。

    到達可能性チェック — ../../references/reachability-check.md を読み、2段階プローブを今すぐ実行してください。完了後ここに戻ります(またはユーザーがキャンセルした場合は停止)。

    ../../references/scan-workflow.md を読み、識別されたモードのコマンドのみを全体に適用してください。 ワークフローはスキャン設定を準備し、認証情報を収集し、テストデータを集め、完全なオペレーション単位の分類表を表示し、基本的な動作を検証してから、本スキャン実行前に再度許可を求めます。リスク分類済み検出結果報告書を提示します (認可エラー / セキュリティ品質ゲート対応が必要な適合性問題 / 情報提供型の適合性問題)。 修正候補はセキュリティ品質ゲートルールと認可エラーで決定されます — 重大度のみではありません。 スキルは一時停止し、OAS 変更またはサーバー側コード修正を適用する前にユーザーの同意を求めます。 サーバー側コード修正が適用された、またはスキップされた後、最終スキャン要約前にAPI 再起動をユーザーに促すことをオプションで提示します。

    必須チェックポイント: CONF_FILE への直接編集後(environments.default.variables.*、認可配線、またはシナリオチェーン含む)、scan conf validate を実行し、本スキャンまたは完全なスキャン実行に進む前にすべての検証エラーを解決してください。

    トークンモード:スキャンではセキュリティ品質ゲートは強制されません。すべての検出結果を情報提供として提示します。ユーザーが修正するかどうか(修正する場合はどれを修正するか)を決定します。

  6. 検出結果を表示し、最終スキャン要約前に修正許可を求めます。

    本スキャンが完了した後、検出結果が存在する場合は、scan-workflow.md ステップ 12 を順序通り完了するまで、直接「スキャン完了」要約に進まないでください:

    • 3層構造のスキャン報告書全体を表示(認可エラー / セキュリティ品質ゲート対応が必要な適合性 / 情報提供型の適合性);
    • その報告書とセキュリティ品質ゲートルールから修正候補リストを組み立てる;
    • ステップ 12c の同意質問を提案される修正リスト付きでユーザーに求める。

    ユーザーが明示的に修正を適用する選択をした後のみ、OAS またはサーバー側コード修正に進みます。ユーザーが修正を辞退した場合、または修正と最適な検証ループが完了した後は、最終スキャン要約を提示します(下記の出力形式を参照)。

各許可プロンプトでのみ明示的なユーザー確認後に続行してください。


出力形式

スキャンが完了したら、以下の形式で要約を作成します:

スキャン完了
  モード:          プラットフォーム / トークン
  品質ゲート:      成功(<ゲート名> — 貴社のセキュリティ品質基準を満たしています)    ← プラットフォームモード、成功時
  品質ゲート:      失敗(<ゲート名> — 品質基準を満たしていません。上記の修正が必要です)    ← プラットフォームモード、失敗時
  品質ゲート:      該当なし(トークンモード — スキャン結果は情報提供のみ。基準は強制されません)    ← トークンモード
  タグ:            <カテゴリー>:<タグ名>             ← プラットフォームモードのみ、タグ割り当て時;タグなしの場合はこの行を省略
  認可:            1 オペレーションで BOLA 確認 — OAS 更新 · サーバー側修正を適用
  適合性:          1 件のセキュリティ品質ゲート対応が必要な問題を修正(OAS + コード)· 3 件の情報提供型検出結果を提示
  OAS 更新:        <path/to/openapi.json>

現在のモードと結果に一致するセキュリティ品質ゲート行のみを表示します。

ユーザーが修正を辞退した場合または問題が見つからなかった場合は、代わりにそれを記載してください。


環境変数

変数 目的
SCAN42C_HOST スキャン対象ベース URL(OAS の servers[0] を上書き)— 両モード

その他すべての変数(API_KEY、PLATFORM_HOST、TRIAL_TOKEN)と一般的な制約は ../../references/pre-flight.md で定義されています。

原文(English)を表示

42Crunch Scan Skill

Runs a single phase: Scan (live conformance + authorization testing and SQG-blocking fix loop). Requires explicit user permission before execution. Does not run a static audit — use the 42crunch-audit skill for that.

Assumes the OAS file is already audit-clean (or the user is explicitly running scan only). If the user mentions audit issues before scanning, suggest running 42crunch-audit first.


Entry Point

  1. Pre-flight checks. Read ../../references/pre-flight.md and complete all steps (setup, OAS resolution, tag detection). When prompting for OAS file selection, use the context "scan" (e.g. "Which one should I scan?"). Do not proceed if any step fails or the user cancels.

  2. Resolve the scan target URL.

    Read servers[0].url from the OAS file.

    • If SCAN42C_HOST environment variable is set → announce silently:

      "Using scan target from SCAN42C_HOST: <url>" Store as SCAN_TARGET_URL and proceed.

    • If not set → call AskUserQuestion:
      • question: "The OAS points to <servers[0].url> as the API target. Is this the right URL to scan against?" — options: ["Yes — use this URL", "No — I'll provide a different URL"]
      • If No → ask the user to provide the URL and store it as SCAN_TARGET_URL.
      • If Yes → store servers[0].url as SCAN_TARGET_URL.
  3. OAS analysis for scan preview — run silently before asking permission.

    Read the OAS file and collect:

    • Total operation count
    • Auth scheme types from securitySchemes (Bearer/JWT, API Key, Basic, OAuth2)
    • BOLA candidate count: operations that reference a specific existing resource by a client-supplied id/key/ref — in a path parameter ({…Id}, {…Key}, {…Ref}), a query parameter (?orderId=), or a request-body field (POST /lookup {orderId}, POST /transfer {fromAccountId, toAccountId}). Method does not gate candidacy; only pure collection or create-new operations are excluded
    • Whether the OAS contains sample data: any operation with example, examples, or default values on its request body or parameter schemas

    Carry these results forward — scan-workflow.md reuses them in its auth setup, test-data, and classification steps instead of re-reading the OAS.

  4. Ask for permission to configure the scan. Output the following scan preview as a chat message first:

    Ready to configure the scan?
      Target:   <SCAN_TARGET_URL>
      OAS:      <filename>  (<N> operations)
      Auth:     <scheme types>  [+  second user needed — <N> BOLA candidate(s)]
      Samples:  OAS has sample data  /  No samples — you'll need to provide test data
      Tag:      <category>:<tagname>           ← platform mode only, when a tag is assigned; omit if no tag
      Mode:     Platform / Token
    

    Then call AskUserQuestion:

    • question: "I'm ready to start configuring the scan. I'll ask for credentials, classify your operations, and set up test scenarios — then run a happy path validation before the full scan. Shall I proceed?"
    • options: ["Yes, let's configure", "No, cancel"]
  5. Execute the Scan. Mode is already resolved from pre-flight — do not re-derive it.

    Reachability check — read ../../references/reachability-check.md and run the two-stage probe now. Return here once it completes (or stop if the user cancels).

    Read ../../references/scan-workflow.md and apply only the commands for the identified mode throughout. The workflow sets up the scan config, collects credentials, gathers test data, shows a complete operation-by-operation classification table, validates happy paths, then asks for permission again before running the full scan. It presents a risk-classified findings report (Authorization failures / SQG-blocking conformance / informational conformance). Fix candidates are determined by SQG-blocking rules and authorization failures — not severity alone. The skill pauses and asks the user to consent before applying any OAS changes or server-side code fixes. Optionally prompt user to restart the API after server-side code fixes are applied, or skipped, before the final scan summary.

Mandatory checkpoint: after any direct edit to CONF_FILE (including environments.default.variables.*, auth wiring, or scenario chains), run scan conf validate and resolve all validation errors before continuing to happy-path or full scan runs.

Token mode: no SQG is enforced for scan. Present all findings for information. The user decides which (if any) to fix.

  1. Render findings and ask for fix permission before final Scan summary.

    After the full scan completes, do not jump directly to the final "Scan Complete" summary when findings exist. First complete scan-workflow.md Step 12 in order:

    • render the full three-tier scan report (Authorization failures / SQG-blocking conformance / informational conformance);
    • assemble the fix candidate lists from that report and the SQG blocking rules;
    • ask the user the Step 12c consent question with the proposed fix lists.

    Only proceed to OAS or server-side code fixes after the user explicitly chooses to apply fixes. If the user declines fixes, or after the fix and optional verification loop completes, then present the final scan summary (see Output Format below).

Only continue after explicit user confirmation at each permission prompt.


Output Format

After the scan completes, produce a summary in this shape:

Scan Complete
  Mode:           Platform / Token
  SQG:            PASSED  (<sqg-name> — your org's security quality gate is met)    ← platform mode, passed
  SQG:            FAILED  (<sqg-name> — the quality gate is not met; fixes above are required)    ← platform mode, failed
  SQG:            N/A  (Token mode — scan findings are informational; no gate enforced)    ← token mode
  Tag:            <category>:<tagname>             ← platform mode only, when a tag is assigned; omit this row if no tag
  Authorization:  BOLA confirmed on 1 operation — OAS updated · server-side fix applied
  Conformance:    1 SQG-blocking issue fixed (OAS + code) · 3 informational findings surfaced
  OAS updated:    <path/to/openapi.json>

Show only the one SQG line that matches the current mode and result.

If the user declined to apply fixes or no issues were found, note that instead.


Environment Variables

Variable Purpose
SCAN42C_HOST Scan target base URL (overrides OAS servers[0]) — Both modes

All other variables (API_KEY, PLATFORM_HOST, TRIAL_TOKEN) and general constraints are defined in ../../references/pre-flight.md.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。