• 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-setup

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

42Crunchの環境をセットアップして、監査と検査のスキルがスムーズに動作するようにします。 次のような場合に使用: ユーザーが42Crunchを初めて設定したい、42c-astバイナリ(実行可能なプログラム)をインストールまたは更新したい、APIキー(認証用の暗号化コード)を設定したい、または認証情報やバイナリのエラーをトラブルシューティングしたい場合。 「42crunchのセットアップ」「42crunchの設定」「42c-astのインストール」「42c-astの更新」「APIキーの設定」「42crunchが動作しない」「バイナリが見つからない」といった表現や、監査・検査の実行前に環境を準備するリクエストで自動起動します。

原文を表示

Set up the 42Crunch environment so that audit and scan skills can run without friction. Use this skill whenever the user wants to configure 42Crunch for the first time, install or update the 42c-ast binary, configure an API key, or troubleshoot missing credentials or binary errors. Triggers on phrases like "setup 42crunch", "configure 42crunch", "install 42c-ast", "update 42c-ast", "set api key", "42crunch not working", "binary not found", or any request to prepare the environment before running an audit or scan.

ユースケース
  • 42Crunchを初めて設定したい
  • 42c-astバイナリをインストールまたは更新したい
  • APIキーを設定したい
  • 認証情報やバイナリのエラーをトラブルシューティングしたい
本文(日本語訳)

42Crunch セットアップ

42Crunch の監査とスキャンのワークフローを使用するために、2つのフェーズで環境を準備します:

  1. 42c-ast バイナリ(実行ファイル)が指定の場所にインストールされていることを確認する
  2. 認証情報を設定して保存する

エントリーポイント

呼び出し元の状況: このスキルは、ユーザーが直接実行することも、別のスキル(例:pre-flight)から部品として呼び出されることもあります。呼び出し元が指定されているかを確認してください。ステップ 1 と 6 の動作は、この状況によって異なります。各ステップの説明を参照してください。

ステップ 1 — セットアップの説明

ユーザーが直接実行した場合(呼び出し元の情報がない場合)、ユーザーに挨拶をして、セットアップ完了後にできることを説明してください:

ようこそ。42Crunch の環境準備をお手伝いします。これは1回限りのセットアップで、約2分で完了します。セットアップ完了後は、以下のことができるようになります:

  • OpenAPI ファイルを監査 して、セキュリティの問題を発見し、スコアと改善方法をまとめたレポートを取得
  • ライブ API をスキャン して、BOLA(認可回避)、BFLA(機能の不正利用)、仕様適合性の問題を検出
  • 問題を自動修正 (各ステップで承認が必要)

2つの簡単なステップで対応します:

  1. このマシンに 42c-ast 分析バイナリをインストール
  2. 42Crunch の認証情報を登録(スターター(無料試用版)/ 個人 / 個人 Pro プランのトークン、またはチーム 10 / チーム 25 / エンタープライズ向けプラットフォームアカウントと API キー)

始めましょう。

別のスキルから部品として呼び出された場合(呼び出し元の情報がある場合)、この挨拶をスキップして、ステップ 2 に進んでください。

ステップ 2 — バイナリのセットアップ

../../references/binary-setup.md に完全に従います(詳細モード — 主要な各ステップをユーザーに説明します)。

バイナリがインストールできない場合は、エラーを明確に表示して停止します。ステップ 3 には進みません。

ステップ 3 — 認証情報のセットアップ

../../references/credential-setup.md に完全に従います。

このプロセスは以下の順序で実施します:

  • ~/.42crunch/conf/env(macOS/Linux)または %APPDATA%\42Crunch\conf\env(Windows)に認証情報が既に存在するか静かに確認します。既に設定されている場合は、モードとマスク済みキーを表示し、保持するか変更するか選択させます。
  • 設定されていない場合(または変更する場合)、ガイド付きフローでユーザーを案内します:
    • 42Crunch のサブスクリプションをお持ちですか?
      • いいえ → スターター(無料試用版)の登録リンク([42Crunch Starter (Free Trial)](https://42crunch.com/freemium/?source=claude))と有料プランの料金詳細(個人 / 個人 Pro はトークンを使用、チーム 10 / チーム 25 / エンタープライズはプラットフォームアカウントと API キーを使用)を表示して停止し、ユーザーの戻りを待ってからトークンまたはプラットフォーム API キーを選択させ、それぞれのフローに振り分け
      • はい → トークンをお持ちですか、それともプラットフォームアカウントと API キーをお持ちですか?
        • トークン(スターター(無料試用版)/ 個人 / 個人 Pro)→ トークンを入力
        • プラットフォーム API キー(チーム 10 / チーム 25 / エンタープライズ)→ API キーを入力 → プラットフォーム URL を選択(US / EU / その他)
  • 認証情報を ~/.42crunch/conf/env に書き込み、macOS/Linux では chmod 600 を設定します。

ステップ 4 — 最終確認

ステップ 2 と 3 は既にそれぞれの確認で終了しています:binary-setup.md は --version が 0 で終了することを確認し、credential-setup.md のステップ 4 は認証情報行が存在することを確認します。このやり取りにこれら両方の結果が既にある場合は、再度実行せず、結果を再利用してステップ 5 に進んでください。

このやり取りに結果がない部分に対してのみ、以下のチェックを実行してください。認証情報チェックは存在確認のみです — 値は絶対に表示しないでください:

# バイナリ(macOS / Linux)
"$HOME/.42crunch/bin/42c-ast" --version
# バイナリ(Windows)
& "$env:APPDATA\42Crunch\bin\42c-ast.exe" --version
# 認証情報(macOS / Linux)
grep -qE "^(API_KEY|TRIAL_TOKEN)=" "$HOME/.42crunch/conf/env" && echo "CREDS=OK" || echo "CREDS=MISSING"
# 認証情報(Windows)
if (Select-String -Path "$env:APPDATA\42Crunch\conf\env" -Pattern "^(API_KEY|TRIAL_TOKEN)=" -Quiet) { "CREDS=OK" } else { "CREDS=MISSING" }

チェックのいずれかが失敗した場合は、具体的な失敗を報告し、ユーザーがそれを解決するよう案内してから続行してください。

ステップ 5 — セットアップサマリーの表示

セットアップサマリーを表示します(出力形式は下記を参照)。

ステップ 6 — 次のステップの提案

別のスキルから部品として呼び出された場合(呼び出し元の情報がある場合)、次のステップの提案をスキップしてください。「セットアップ完了 — 続行します。」と表示して、呼び出し元にコントロールを戻します。呼び出し元(例:pre-flight)は中断したところから再開します。

ユーザーが直接実行した場合(呼び出し元の情報がない場合)、以下を表示します:

セットアップが完了しました。これからできることをご紹介します:

  • 42crunch-audit — OpenAPI ファイルを渡していただければ、スコアを算出し、セキュリティ問題を重大度で分類して、SQG 対応が必要な問題を承認を得たうえで自動修正します。API を初めて監査する場合は最初のステップです。

  • 42crunch-scan — ライブ API に対して仕様適合性と認可のテストを実行します。BOLA、BFLA、レスポンス仕様違反をチェックします。監査完了後の実行がお勧めです。

  • 42crunch-api-security-testing — 監査とスキャンを連続実行します。1回のセッションで全体像を把握したい場合の推奨ワークフローです。

どれから始めますか?


出力形式

## 42Crunch セットアップ完了

| 項目             | 状態                                                |
|------------------|-----------------------------------------------------|
| バイナリ         | <バイナリパス> v<バージョン>                        |
| 認証情報モード   | <プラットフォーム / トークン>                       |
| API キー / トークン | プラットフォーム: `api_••••••••` または `ide_••••••••` |
|                  | トークン: `<先頭4文字>••••••••`                    |
|                  | (保存先: <パス>)                                  |
| プラットフォームホスト | <URL>  ← トークンモードではこの行を省略             |


一般的な制約

  • すべての確認ステップ(バイナリ確認、認証情報確認)は静かに実行します。失敗時またはユーザーへの問い合わせ時のみ結果を表示します。
  • ユーザーが入力した後、API キーまたはトークンを平文で表示しません。必ずマスクします(プラットフォームトークンは api_•••••••• / ide_•••••••• — プリフィックスは保持、残りは置換;トークンは <先頭4文字>••••••••、例:eyJh••••••••)。
  • すべてのシェルコマンドに Bash ツールを使用します。設定ファイルを書き込むときは Edit ツールまたは Write ツールを使用し、シェルのリダイレクトは使用しません。
  • ダウンロードに curl を使用;curl が利用できない場合は wget にフォールバック。Windows では Invoke-WebRequest を使用します。
  • Windows:バイナリファイル名は 42c-ast.exe、パスは \ を使用、設定は %APPDATA%\42Crunch\conf\env に配置、chmod 600 はスキップ(Windows ACL が APPDATA を保護)。

環境変数

変数 デフォルト モード
API_KEY (必須) プラットフォーム(チーム 10 / チーム 25 / エンタープライズ)
PLATFORM_HOST (セットアップ時に設定) プラットフォームのみ(チーム 10 / チーム 25 / エンタープライズ)
TRIAL_TOKEN (必須) トークン方式(スターター(無料試用版)/ 個人 / 個人 Pro)
原文(English)を表示

42Crunch Setup

Prepares the environment for 42Crunch audit and scan workflows in two phases:

  1. Ensure the 42c-ast binary is installed at the canonical path.
  2. Configure and store credentials.

Entry Point

Caller context: This skill may be invoked directly by the user or as a subroutine by another skill (e.g. pre-flight). Check whether a caller was passed. Steps 1 and 6 behave differently depending on this context — see each step for details.

Step 1 — Introduce the setup

If called directly by the user (no caller context), greet the user and explain what they'll be able to do once setup is complete:

Welcome — let me get your 42Crunch environment ready. This is a one-time setup that takes about two minutes. Once done, you'll be able to:

  • Audit any OpenAPI file for security issues and get a scored, actionable report
  • Scan a live API to catch BOLA, BFLA, and conformance problems
  • Fix SQG-blocking issues automatically, with your approval at every step

I'll handle this in two quick steps:

  1. Install the 42c-ast analysis binary on this machine.
  2. Connect your 42Crunch credentials (a token from Starter (Free Trial) / Individual / Individual Pro, or a Platform account with an API key for Team 10 / Team 25 / Enterprise).

Let's go.

If called as a subroutine (caller context is set), skip this greeting entirely and proceed directly to Step 2.

Step 2 — Binary setup

Follow ../../references/binary-setup.md completely (verbose mode — announce each major step to the user).

Stop and surface a clear error if the binary cannot be installed. Do not proceed to Step 3.

Step 3 — Credential setup

Follow ../../references/credential-setup.md completely.

The procedure covers, in order:

  • Silently check whether credentials are already present in ~/.42crunch/conf/env (macOS/Linux) or %APPDATA%\42Crunch\conf\env (Windows). If already configured: show mode + masked key, offer to keep or replace.
  • If not configured (or replacing): walk the user through the guided flow:
    • Do you have a 42Crunch Subscription?
      • No → show Starter (Free Trial) registration link ([42Crunch Starter (Free Trial)](https://42crunch.com/freemium/?source=claude)) and the paid-plans pricing breakdown (Individual / Individual Pro use a token; Team 10 / Team 25 / Enterprise use a Platform account with an API key); stop and wait for the user to return, then ask token vs Platform-API-key and route accordingly
      • Yes → Do you have a token, or a Platform account with an API key?
        • Token (Starter (Free Trial) / Individual / Individual Pro) → enter token
        • Platform API key (Team 10 / Team 25 / Enterprise) → enter API Key → select Platform URL (US / EU / Other)
  • Write credentials to ~/.42crunch/conf/env, set chmod 600 on macOS/Linux.

Step 4 — Final verification

Steps 2 and 3 already end with their own verification: binary-setup.md confirms --version exits 0, and credential-setup.md Step 4 confirms the credential line is present. If both results are already in this conversation, do not re-run those commands — reuse the results and continue to Step 5.

Only run the checks below for a part whose result is missing from this conversation. The credential check is presence-only — never print the value:

# Binary (macOS / Linux)
"$HOME/.42crunch/bin/42c-ast" --version
# Binary (Windows)
& "$env:APPDATA\42Crunch\bin\42c-ast.exe" --version
# Credentials (macOS / Linux)
grep -qE "^(API_KEY|TRIAL_TOKEN)=" "$HOME/.42crunch/conf/env" && echo "CREDS=OK" || echo "CREDS=MISSING"
# Credentials (Windows)
if (Select-String -Path "$env:APPDATA\42Crunch\conf\env" -Pattern "^(API_KEY|TRIAL_TOKEN)=" -Quiet) { "CREDS=OK" } else { "CREDS=MISSING" }

If either check fails, report the specific failure and guide the user to resolve it before continuing.

Step 5 — Present summary

Display the setup summary (see Output Format below).

Step 6 — Recommend next steps

If called as a subroutine (caller context is set), skip the next-steps prompt entirely. Announce "Setup complete — continuing." and return control to the caller. The caller (e.g. pre-flight) will resume from where it left off.

If called directly by the user (no caller context), present the following:

You're all set. Here's what you can do right now:

  • 42crunch-audit — Hand me an OpenAPI file and I'll score it, classify every security issue by severity, and fix the SQG-blocking ones with your approval. A good first step if you haven't audited this API before.

  • 42crunch-scan — Run a live conformance and authorization test against a running API. I'll check for BOLA, BFLA, and response-contract violations. Best run after the audit passes.

  • 42crunch-api-security-testing — Runs both audit and scan back-to-back. The recommended workflow when you want the full picture in one session.

Which would you like to start with?


Output Format

## 42Crunch Setup Complete

| Item             | Status                                              |
|------------------|-----------------------------------------------------|
| Binary           | <BINARY_PATH> v<version>                            |
| Credential mode  | <Platform \| Token>                                 |
| API key / Token  | Platform: `api_••••••••` or `ide_••••••••`          |
|                  | Token: `<first-4-chars>••••••••`                    |
|                  | (stored in <path>)                                  |
| Platform host    | <url>  ← omit this row for Token mode               |


General Constraints

  • All detection steps (binary check, credential check) run silently. Surface output only on failure or when prompting the user.
  • Never print the API key or token in plaintext after the user enters it. Always mask it (api_•••••••• / ide_•••••••• for platform tokens — keep prefix, replace rest; <first-4-chars>•••••••• for tokens, e.g. eyJh••••••••).
  • Use the Bash tool for all shell commands; use the Edit or Write tools when writing config files — never shell redirection.
  • Use curl for downloads; fall back to wget if curl is unavailable. On Windows use Invoke-WebRequest.
  • On Windows: binary filename is 42c-ast.exe, paths use \, config lives in %APPDATA%\42Crunch\conf\env, skip chmod 600 (Windows ACLs protect APPDATA).

Environment Variables

Variable Default Mode
API_KEY (required) Platform (Team 10 / Team 25 / Enterprise)
PLATFORM_HOST (set during setup) Platform only (Team 10 / Team 25 / Enterprise)
TRIAL_TOKEN (required) Token-based (Starter (Free Trial) / Individual / Individual Pro)

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