• 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

api

プラグイン
stackhawk-api
ソース
GitHub で見る ↗
説明

このスキルは、ユーザーやエージェント(自動実行プログラム)がStackHawk プラットフォームに問い合わせて、セキュリティレポート、検出結果の分析、またはアプリ管理を行う必要がある場合に使用します。 **次のような場合に使用:** - 「stackhawk api」 - 「security posture(セキュリティ状況)」 - 「findings report(検出結果レポート)」 - 「show me findings」 - 「untriaged findings(優先順位未判定の検出結果)」 - 「which apps」 - 「scan history」 - 「security dashboard」 - 「triage(優先順位付け)」 - 「what needs attention」 プラットフォームへのすべての問い合わせは、hawk CLI(コマンドラインツール)の `hawk op` サブコマンド(補助機能)を使用します。 **このスキルは以下の場合には使用しないでください:** - スキャン実行:「scan my app」「hawkscan」「stackhawk.yml」「DAST(動的セキュリティ検査)」などの場合は、hawkscan スキルを使用してください - コードやセキュリティ脆弱性の修正・改善:このスキルはプラットフォームデータの読み込みと報告のみを行います

原文を表示

Use this skill when a user or agent needs to query the StackHawk platform for security reporting, findings analysis, or app management. Triggers include: "stackhawk api", "security posture", "findings report", "show me findings", "untriaged findings", "which apps", "scan history", "security dashboard", "triage", "what needs attention". Uses the hawk CLI (`hawk op` subcommand) for all platform queries. Do NOT use for running scans (use the hawkscan skill for "scan my app", "hawkscan", "stackhawk.yml", "DAST") or for fixing/remediating code or vulnerabilities — this skill only reads and reports platform data.

ユースケース
  • セキュリティレポートと検出結果を確認するとき
  • アプリのセキュリティ状況を把握するとき
  • 優先順位未判定の検出結果を確認するとき
  • スキャン履歴を確認するとき
  • 検出結果に優先順位を付けるとき
本文(日本語訳)

StackHawk API スキル

このスキルにより、Claude は StackHawk プラットフォーム上のセキュリティレポート作成エージェント(自動処理を担う専用機能)として機能します。基本的な流れは以下の通りです。

質問 → 認証 → hawk op 経由で API にクエリ送信 → 結果を表示 → 次のアクションを提案

すべてのプラットフォームクエリは hawk バイナリの op サブコマンド(hawk op …)を通じて実行されます。これは認証、トークンの更新、ページネーション(複数ページにまたがるデータの自動取得)を処理し、安定した JSON 形式で結果を返します。生の REST API へのフォールバック(別の方法での代用)はありません。hawk が利用できない場合は、curl(データ取得ツール)を手動で使わず、インストールして hawk init --browser を実行してください。詳細は references/hawk-op-shortcuts.md を参照してください。


ステップ 1: 状況を確認する

API を呼び出す前に、利用可能な環境をチェックしてください。

  1. hawk がインストールされ、設定されているか?(hawk version で v6.0.0 以上が表示される)

    # CLI の利用統計を記録する(hawk/hawkop が読み込む)
    export _STACKHAWK_SKILL=api
    command -v hawk >/dev/null && hawk op status
    
    • 有効な組織 + JWT(認証トークン)がある → 続行してください
    • インストールされているが設定されていない → hawk init --browser を実行(対話的に進みます。統合バイナリには hawk op init はなく、hawk init が ~/.hawk/hawk.properties に認証情報を保存し、hawk op がそれと HAWK_API_KEY 環境変数を読み込みます)
    • インストールされていない → ユーザーに hawk CLI をインストールするよう指示(参考:docs.stackhawk.com)して、処理を止めてください。curl への代用はしないでください
  2. hawk op で認証されているか? ローカルまたはエージェント使用の場合、hawk init --browser は認証情報を ~/.hawk/hawk.properties に保存するため、対話的セッションで環境変数は不要です。以下で確認してください:

    hawk op status
    

    CI/CD のみ: パイプライン(自動実行環境)で実行している場合、HAWK_API_KEY を秘密情報として設定してください。hawk op が直接読み込みます。設定ファイルは不要です。

  3. orgId(組織 ID)は分かっているか? ほとんどのエンドポイント(API の機能)で必須です。

    • hawk op org get → 現在の組織 UUID(識別子)が返されます
    • hawk op org set <ID> → デフォルト組織を切り替えます
  4. ユーザーの意図に基づいてルートを決定:

    ユーザーの質問 次に進む
    「セキュリティ対策の状況は?」「ダッシュボード」 ステップ 3(組織全体のサマリー)
    「〇〇アプリの検出事項を教えて」「何に対応が必要?」 ステップ 4(アプリの詳細分析)
    「最近スキャンされていないアプリは?」 ステップ 3(古いアプリに注目)
    「先週からの変化は?」「何が新しく出た?」 ステップ 4(差分の確認)
    「未対応の検出事項を表示」 ステップ 3、次にステップ 4 で対象アプリを詳細分析

ステップ 2: 認証する

対話的なセットアップは hawk init --browser を一度実行するだけです。CLI は認証情報を ~/.hawk/hawk.properties に保存し、hawk op が自動的にトークンを更新して、失敗時に再試行します。このスキルではこれ以上の認証作業は必要ありません。

→ 完全なセットアップコマンド(インストール、CI 環境変数、組織切り替え用プロファイル): references/hawk-op-shortcuts.md


ステップ 3: 組織全体のセキュリティ状況を表示する

目標: すべてのアプリと環境全体のセキュリティ健全性を全体的に把握させる。

進め方

hawk op app list と hawk op scan list を使い、組織レベルのビューを作成します。hawk op app list --format json はアプリのメタデータを返し、hawk op scan list --format json はスキャンごとの重要度別件数を返します。applicationId で結合して、対策状況表を構築してください。

# すべてのアプリとメタデータ(チーム、種類、環境数)
hawk op app list --format json

# 組織全体の最近のスキャン — 重要度別件数を含む
hawk op scan list --limit 500 --format json

スキャンごとの利用可能なフィールド:highAlertCount、mediumAlertCount、lowAlertCount、applicationId、environmentName、startedTimestamp、status。

表形式で提示する

以下のように応答をフォーマットしてください:

アプリ名 環境 高 中 低 最終スキャン
My API 本番 3 7 12 2024-01-15
Auth Service ステージング 0 2 4 2024-01-10

applicationId → アプリ名は hawk op app list --format json で解決してください。

優先事項を強調する

  • 古いアプリ:startedTimestamp が 30 日以上前 — 「最近スキャンなし」と表示
  • 高重要度の問題点:highAlertCount > 0 の環境を降順でソート
  • 未完了スキャン:status が COMPLETED でない — 設定の問題がある可能性

表を示した後

強調されたアプリを詳しく調べることを提案してください:

  • 「アプリ X に 3 件の未対応の高重要度検出事項があります — 詳細を取得しますか?」
  • → ユーザーが選択したアプリについてステップ 4 へ

jq 変換(データ加工ツール)を含む完全なレシピ: → references/reporting-recipes.md


ステップ 4: アプリの詳細分析

目標: 単一のアプリについて具体的な検出事項の詳細を取得する — 何が見つかったのか、どこで、どういう意味か。

hawk op scan get(ほぼ 90% のケースをカバー)

hawk op scan get はスキャン → 警告 → 検出事項のチェーンを内部で処理します。手動での掘り下げ、ID 抽出、トークン処理は不要です。

# あるアプリの最新スキャン — 概要 + 警告表
hawk op scan get --app "<APP_NAME>"

# HTTP の証拠と対策方法を含むすべての検出事項(AI エージェントの推論に最適)
hawk op scan get --app "<APP_NAME>" --detail full --format json

--detail full は、すべての警告、影響を受けた URI、HTTP メッセージ(--max-body-size による制限あり)、対策方法のガイダンスを 1 つの JSON で返します。

→ 特定のスキャン ID、単一警告 / 単一 URI の詳細分析、--max-findings の調整: references/hawk-op-shortcuts.md 第 2 節

検出事項を表示する

構造化されたサマリーを表示してください:

  • スキャン概要:日付、実行時間、重要度別の警告総数
  • 警告の分類:警告名、重要度、CWE(脆弱性分類)、影響を受けたパスの数
  • 検出事項の詳細:高重要度の場合 — 影響を受けた URI、HTTP メソッド、パラメータ、対応状況

プラットフォーム上のスキャンへのリンク:

https://app.stackhawk.com/scans/{scanId}

「何が変わった?」— 差分確認のレシピ

2 つのスキャンを比較します:hawk op scan list でアプリの 2 つの最新スキャン ID を取得し、それぞれ hawk op scan get で警告を取得し、pluginId のセット(集合)で差分を取ります。

→ 実行可能なレシピ(hawk op パイプラインと comm 差分ツール): references/hawk-op-shortcuts.md 第 2 節 → 完全な jq レシピ:references/reporting-recipes.md


ステップ 5: 結果を提示して、次のアクションを提案する

フォーマット

  • 表を複数アプリ / 複数検出事項のサマリーに使用
  • 構造化リストを単一アプリの詳細分析に使用
  • 特定のスキャンに言及する際は、常にプラットフォームリンク(app.stackhawk.com/scans/{scanId})を含める
  • 各検出事項の隣に対応状況(NEW(新規)、FALSE_POSITIVE(誤検知)、RISK_ACCEPTED(リスク受容)、ASSIGNED(割り当て済み))を表示

次のアクション提案

データが示すことに基づいて提案をしてください:

検出内容 推奨アクション
高重要度の検出事項あり 直ちの対策を推奨。検出事項の詳細を → hawkscan スキル(スキャン実行スキル)に渡し、修正を検証するために再スキャンを提案
古いアプリ(30 日以上スキャンなし) 新しいスキャンの実行を推奨 → hawkscan スキル
すべての環境で結果がクリーン パスの件数が少ない場合、スパイダー(クローラ)のチューニングが必要な可能性 → hawkscan スキル、設定パターン参考資料
未対応の検出事項(status: NEW) プラットフォームでの対応を指示:app.stackhawk.com — 対応状況の変更は本スキルの範囲外
アプリの状態が ENV_INCOMPLETE プラットフォームで環境設定を完了するよう指示

プラットフォーム UI vs API データ

API データ(本スキル)を使う場合:

  • 多数のアプリ全体のセキュリティ対策レポートを生成する
  • プログラムで複数スキャン間の検出事項を比較する
  • スキャン出力から CI/CD ゲート(デプロイ判定)の決定を構築する

プラットフォーム UI を案内する場合:

  • 個別の検出事項を対応状況として記録する(受け入れ、誤検知とマーク)
  • API キー、チームメンバーシップ、またはアプリ設定を管理する
  • 特定の検出事項のリクエスト / レスポンス証拠を表示する(または hawk op scan get <SCAN_ID> --uri-id <ID> --message を使用)

よくある間違いと避け方

  • スクリプトに API キーをハードコードしない — CI/CD では常に ${HAWK_API_KEY} を参照し、ローカル使用では hawk init --browser で認証情報を保存し、キー値を埋め込まないでください
  • orgId と appId を混同しない — hawk op scan list --app <APP_ID> はアプリ UUID を受け取ります。組織は設定から暗黙的に読まれ、必要に応じて --org <ID> でオーバーライド。混在させると結果は空になり、エラーは返りません
  • API 経由での対応状況変更を試みない — 対応状況の変更操作(受け入れ、誤検知としてマーク)は本スキルの範囲外。ユーザーをプラットフォーム UI app.stackhawk.com に案内してください
  • パス件数を確認せずに「検出事項なし」と報告しない — 検出事項が空のリストは、スパイダーがクロールしたルート数が不足している可能性があります。スキャンでパス件数が少ない場合
原文(English)を表示

StackHawk API Skill

This skill enables Claude to act as a security reporting agent against the StackHawk platform. The core workflow is:

Question → Authenticate → Query API via hawk op → Present Results → Suggest Next Actions

All platform queries run through the hawk binary's op subtree (hawk op …). It authenticates, refreshes tokens, follows pagination, and emits stable JSON. There is no raw-REST fallback — if hawk is unavailable, install it and run hawk init --browser rather than hand-rolling curl. See references/hawk-op-shortcuts.md.


Step 1: Assess Context

Before making any calls, check what's available:

  1. Is hawk installed and configured? (hawk version reports v6.0.0 or greater)

    # Identify the driving skill for CLI usage telemetry (read by hawk/hawkop).
    export _STACKHAWK_SKILL=api
    command -v hawk >/dev/null && hawk op status
    
    • valid org + JWT → proceed.
    • installed but unconfigured → hawk init --browser (interactive; the combined binary has no hawk op init — hawk init writes ~/.hawk/hawk.properties, which hawk op reads along with the HAWK_API_KEY env var).
    • not installed → instruct the user to install the hawk CLI (docs: docs.stackhawk.com) and stop; do not fall back to curl.
  2. Is hawk op authenticated? For local/agentic use, hawk init --browser stores credentials in ~/.hawk/hawk.properties — no env var needed for interactive sessions. Verify:

    hawk op status
    

    CI/CD only: If running in a pipeline, set HAWK_API_KEY as a secret. hawk op reads it directly — no config file required.

  3. Is orgId known? Required for most endpoints.

    • hawk op org get returns the active org UUID.
    • hawk op org set <ID> switches the default org.
  4. Route based on user intent:

    User says... Go to...
    "What's my security posture?" or "dashboard" Step 3 (org summary)
    "Tell me about [app]'s findings" or "what needs attention" Step 4 (app deep dive)
    "What apps haven't been scanned recently?" Step 3 with stale-app focus
    "What changed since last week?" or "what's new" Step 4 with diff recipe
    "Show me untriaged findings" Step 3, then drill into Step 4 for flagged apps

Step 2: Authenticate

hawk init --browser once for interactive setup — the CLI stores credentials in ~/.hawk/hawk.properties and hawk op handles token refresh and 401 retry on every call. No further auth work for this skill.

→ Full setup commands (install, CI env var, profiles for org switching): references/hawk-op-shortcuts.md.


Step 3: Org Posture Summary

Goal: Give the user a bird's-eye view of security health across all apps and environments.

Approach

Use hawk op app list and hawk op scan list to assemble an org-level view. hawk op app list --format json returns app metadata; hawk op scan list --format json returns per-scan severity counts. Join on applicationId to build a posture table.

# All apps with metadata (team, type, env count)
hawk op app list --format json

# Recent scans across the org — has per-scan severity counts
hawk op scan list --limit 500 --format json

Fields available per scan: highAlertCount, mediumAlertCount, lowAlertCount, applicationId, environmentName, startedTimestamp, status.

Present as a table

Format the response as:

App Environment High Medium Low Last Scan
My API Production 3 7 12 2024-01-15
Auth Service Staging 0 2 4 2024-01-10

Resolve applicationId → app name via hawk op app list --format json.

Flag priority items

  • Stale apps: startedTimestamp older than 30 days — flag as "No recent scan"
  • High severity hotspots: environments with highAlertCount > 0, sorted descending
  • Incomplete scans: status not COMPLETED — may indicate config issues

After presenting the table

Offer to drill down on any flagged app:

  • "App X has 3 unaddressed High findings — shall I pull the full finding details?"
  • → Step 4 for any app the user selects

Full recipe with jq transforms: → references/reporting-recipes.md


Step 4: App Deep Dive

Goal: Get specific finding details for a single app — what was found, where, and what it means.

hawk op scan get (one command covers ~90% of cases)

hawk op scan get walks the scan → alerts → findings chain internally. No manual drill-down, no ID extraction, no token handling.

# Latest scan for an app — overview + alerts table
hawk op scan get --app "<APP_NAME>"

# Full findings with HTTP evidence + remediation (best for AI agent reasoning)
hawk op scan get --app "<APP_NAME>" --detail full --format json

--detail full returns every alert, every affected URI, HTTP messages (subject to --max-body-size), and remediation guidance in one JSON blob.

→ Specific scan IDs, single-alert / single-URI drill-down, --max-findings tuning: references/hawk-op-shortcuts.md §2.

Present findings

Show a structured summary:

  • Scan summary: date, duration, total alerts by severity
  • Alert breakdown: alert name, severity, CWE, number of affected paths
  • Finding details: for High severity — affected URI, HTTP method, parameter, triage status

Link to the scan on the platform:

https://app.stackhawk.com/scans/{scanId}

"What changed?" — diff recipe

Compare two scans: use hawk op scan list to get the two most recent scan IDs for the app, pull alerts for each via hawk op scan get, diff the pluginId sets.

→ Executable recipe (hawk op pipeline with comm diff): references/hawk-op-shortcuts.md §2. → Full jq recipes: references/reporting-recipes.md.


Step 5: Present Results and Suggest Next Actions

Formatting

  • Use tables for multi-app/multi-finding summaries
  • Use structured lists for single-app deep dives
  • Include the platform link (app.stackhawk.com/scans/{scanId}) whenever referencing a specific scan
  • Show triage status (NEW, FALSE_POSITIVE, RISK_ACCEPTED, ASSIGNED) alongside each finding

Next action suggestions

Base suggestions on what the data shows:

Finding Suggested action
High severity findings present Recommend immediate remediation; offer to hand finding details to → hawkscan skill for a re-scan to verify fixes
Stale apps (no scan > 30 days) Recommend running a fresh scan → hawkscan skill
Clean results across all envs Note that low path count may mean the spider needs tuning → hawkscan skill, config-patterns reference
Untriaged findings (status: NEW) Direct to platform for triage: app.stackhawk.com — triage write operations are out of scope for this skill
ENV_INCOMPLETE app status Direct to platform to complete environment configuration

Platform UI vs API data

Use API data (this skill) when:

  • Generating a bulk posture report across many apps
  • Comparing findings across scans programmatically
  • Building a CI/CD gate decision from scan output

Direct to platform UI when:

  • Triaging individual findings (accept, mark false positive)
  • Managing API keys, team membership, or app configuration
  • Viewing request/response evidence for a specific finding (or use hawk op scan get <SCAN_ID> --uri-id <ID> --message)

Common Mistakes to Avoid

  • Don't hardcode API keys in scripts — always reference ${HAWK_API_KEY} for CI/CD; store credentials via hawk init --browser for local use; never inline the key value itself.
  • Don't confuse orgId with appId — hawk op scan list --app <APP_ID> takes the app UUID. The org is implicit from config; override with --org <ID> if needed. Mixing them returns empty results, not an error.
  • Don't attempt triage via API — triage write operations (accept, false positive) are not in scope for this skill. Direct users to the platform UI at app.stackhawk.com.
  • Don't report "no findings" without checking path count — an empty findings list may mean the spider didn't crawl enough routes. Low path count on a scan is a coverage gap, not a clean bill of health. Recommend spider tuning via → hawkscan skill.
  • Don't forget --detail full when you need the remediation/HTTP message payload. The default hawk op scan get output is the overview — it won't include per-URI evidence.

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