• 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(APIのセキュリティ診断・監査ツール)の環境を、以下の2つのフェーズで準備します:

  1. 42c-ast バイナリ(実行形式プログラム)が正しい場所にインストールされていることを確認する
  2. 認証情報を設定・保存する

エントリーポイント

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

ステップ1 — セットアップの案内

ユーザーが直接実行した場合(呼び出し元の文脈がない場合)、ユーザーを歓迎し、セットアップ完了後にできることを説明します:

ようこそ — 42Crunchの環境を整えます。これは1回限りのセットアップで、約2分かかります。完了すれば、以下のことができるようになります:

  • Audit(診断) — OpenAPIファイルのセキュリティ問題をスコア形式で診断し、対応策を提示
  • Scan(スキャン) — 実行中のAPIに対してBOLA(認可チェック漏れ)、BFLA(機能レベルのアクセス制御漏れ)、仕様への準拠状況をテスト
  • Fix(修正) — セキュリティグレード問題を自動修正します(各ステップで承認が必要)

以下の2つのステップで対応します:

  1. このマシンに 42c-ast 分析ツールをインストール
  2. 42Crunchの認証情報を設定(既存アカウント、または無料アカウント)

始めましょう。

別のスキルから呼び出された場合(呼び出し元の文脈がある場合)、この案内をスキップし、ステップ2に直接進みます。

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

../../references/binary-setup.md の手順に従います(詳細表示モード — 各主要ステップをユーザーに報告)。

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

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

../../references/credential-setup.md の手順に従います。

この手順は以下の順序で進みます:

  • まず静かに、認証情報が ~/.42crunch/conf/env(macOS/Linux)または %APPDATA%\42Crunch\conf\env(Windows)に存在しないか確認します。既に設定されていれば、現在のモードとマスクされたキーを表示し、保持するか置き換えるかを選択させます。
  • 設定されていない場合(または置き換える場合)、ユーザーをガイド付きフローに導きます:
    • 既に42Crunchユーザーですか?
      • はい → APIキーを入力 → プラットフォームURL(US / EU / その他)を選択
      • いいえ → 42Crunch無料版ユーザーとして登録していますか?
        • はい → フリーミアムトークンを入力
        • いいえ → 登録リンク(https://42crunch.com/freemium/)を表示して停止
  • 認証情報を ~/.42crunch/conf/env に書き込み、macOS/Linuxで chmod 600 を設定します。

ステップ4 — 最終確認

簡単な動作確認を実行します:

# バイナリ(macOS / Linux)
"$HOME/.42crunch/bin/42c-ast" --version
# バイナリ(Windows)
& "$env:APPDATA\42Crunch\bin\42c-ast.exe" --version
# 認証情報(macOS / Linux)
grep -E "^(API_KEY|FREEMIUM_TOKEN)=" "$HOME/.42crunch/conf/env"

いずれかの確認が失敗した場合は、具体的な失敗内容を報告し、ユーザーが解決できるようにガイドしてから続行します。

ステップ5 — セットアップの要約を表示

セットアップの要約を表示します(出力形式は下を参照)。

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

別のスキルから呼び出された場合(呼び出し元の文脈がある場合)、次のステップの提案をスキップします。「Setup complete — continuing.(セットアップ完了 — 続行します)」と表示して、制御を呼び出し元に戻します。呼び出し元(例: pre-flight)は途中から再開します。

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

セットアップが完了しました。今すぐできることを紹介します:

  • 42crunch-audit — OpenAPIファイルを提供してください。スコアを付け、セキュリティ問題を重大度で分類し、優先度の高い問題は承認のうえ自動修正します。APIを初めて診断する場合の第一歩です。

  • 42crunch-scan — 実行中のAPIに対して仕様への準拠性と認可テストを実行します。BOLA、BFLA、応答契約違反をチェックします。診断が完了した後の実行が効果的です。

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

どれから始めたいですか?


出力形式

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

| 項目               | ステータス                                          |
|--------------------|-----------------------------------------------------|
| バイナリ           | <BINARY_PATH> v<version>                            |
| 認証モード        | <Platform(プラットフォーム)\| Freemium(フリーミアム)>   |
| APIキー/トークン   | Platform(プラットフォーム): `api_••••••••` または `ide_••••••••` |
|                    | Freemium(フリーミアム): `<最初の4文字>••••••••`  |
|                    | (保存先: <path>)                                  |
| プラットフォーム   | <url>  ← フリーミアムモードの場合は非表示            |


一般的な制約

  • すべての検出ステップ(バイナリ確認、認証情報確認)は静かに実行します。失敗時またはユーザーに入力を促す場合にのみ出力します。
  • ユーザーが入力したAPIキーまたはフリーミアムトークンを平文では絶対に表示しません。必ずマスク表示します(プラットフォームトークンは api_•••••••• / ide_•••••••• の形式で先頭を残して置き換え、フリーミアムトークンは <最初の4文字>•••••••• の形式。例: eyJh••••••••)。
  • すべてのシェルコマンドは bash_tool を使用します。設定ファイル作成時は str_replace_editor または create_file を使用し、シェルのリダイレクトは使いません。
  • ダウンロードは curl を使用。使えない場合は wget にフォールバック。Windows では Invoke-WebRequest を使用します。
  • Windows: バイナリファイル名は 42c-ast.exe、パスは \ を使用、設定は %APPDATA%\42Crunch\conf\env に保存、chmod 600 はスキップ(Windows ACLが APPDATA を保護します)。

環境変数

変数 デフォルト モード
API_KEY (必須) プラットフォーム
PLATFORM_HOST (セットアップ中に設定) プラットフォームのみ
FREEMIUM_TOKEN (必須) フリーミアム
原文(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 (existing platform account or free account).

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:
    • Are you an existing 42Crunch user?
      • Yes → enter API Key → select Platform URL (US / EU / Other)
      • No → Are you a registered 42Crunch Freemium user?
        • Yes → enter Freemium Token
        • No → show registration link (https://42crunch.com/freemium/) and stop
  • Write credentials to ~/.42crunch/conf/env, set chmod 600 on macOS/Linux.

Step 4 — Final verification

Run a quick end-to-end check:

# Binary (macOS / Linux)
"$HOME/.42crunch/bin/42c-ast" --version
# Binary (Windows)
& "$env:APPDATA\42Crunch\bin\42c-ast.exe" --version
# Credentials (macOS / Linux)
grep -E "^(API_KEY|FREEMIUM_TOKEN)=" "$HOME/.42crunch/conf/env"

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 \| Freemium>                              |
| API key / Token  | Platform: `api_••••••••` or `ide_••••••••`          |
|                  | Freemium: `<first-4-chars>••••••••`                 |
|                  | (stored in <path>)                                  |
| Platform host    | <url>  ← omit this row for freemium 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 Freemium token in plaintext after the user enters it. Always mask it (api_•••••••• / ide_•••••••• for platform tokens — keep prefix, replace rest; <first-4-chars>•••••••• for freemium tokens, e.g. eyJh••••••••).
  • Use bash_tool for all shell commands; use str_replace_editor or create_file 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
PLATFORM_HOST (set during setup) Platform only
FREEMIUM_TOKEN (required) Freemium

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