• 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:状況を確認する

呼び出しを実行する前に、何が利用可能かを確認します:

  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、コンテナ、ヘッドレスエージェント)の場合:HAWK_API_KEY を設定してください。 hawk op がこれを直接読み取ります。設定ファイルやブラウザは必要ありません。

  3. orgId(組織 ID)は既知か? ほとんどのエンドポイントに必須です。

    • 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 は毎回トークン更新と 401 エラー時の再試行を処理します。このスキルではそれ以上の認証作業は不要です。

→ セットアップの完全なコマンド(インストール、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

hawk op app list --format json 経由で applicationId → アプリ名を解決します。

優先度の高い項目をマーク

  • 陳腐なアプリ:startedTimestamp が 30 日以上前 → 「最近のスキャンなし」とフラグ付け
  • 重大度が高いホットスポット:highAlertCount > 0 の環境を降順でソート
  • 不完全なスキャン:status が COMPLETED でない → 設定の問題を示す可能性

テーブル表示後

ユーザーが選択したアプリを詳細に分析することを提案:

  • 「アプリ X に対応していない重大な検出結果が 3 件あります。詳細を確認しましょうか?」
  • → ステップ 4 でユーザーが選択したアプリについて

jq 変換を含む完全なレシピ: → references/reporting-recipes.md


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

目的: 単一のアプリについて特定の検出結果の詳細を取得します。何が検出されたか、どこで、そしてそれが何を意味するのか。

hawk op scan get(ほとんどの場合をカバー)

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 ブロブで返します。1 回の呼び出しで最大 10 プラグインの詳細を取得します(CLI は「Fetching 10 plugin details(10 個のプラグイン詳細を取得中)」と表示)。より多くのアラートタイプを含むスキャンの場合は、--plugin-id で残りを詳細化するか、スキャナー自体の hawk scan --json-output ファイル(完全なリスト)を読みます。

→ 特定のスキャン 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 パイプライン with 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 と API データ

次の場合に API データ(このスキル)を使用:

  • 多くのアプリ全体でバルク(一括)セキュリティ状況レポートを生成
  • スキャン間で検出結果をプログラムで比較
  • スキャン出力から CI/CD ゲート判定を構築

次の場合にプラットフォーム UI にユーザーを指示:

  • 個別の検出結果をトリアージ(受理、誤検出のマーク)
  • API キー、チームメンバーシップ、またはアプリ設定の管理
  • 特定の検出結果に関するリクエスト/レスポンスエビデンスを表示(または hawk op scan get <SCAN_ID> --uri-id <ID> --message を使用)

避けるべき一般的な誤り

  • スクリプトに API キーをハードコード化しない → 非対話的セッション(CI、コンテナ、ヘッドレスエージェント)では常に ${HAWK_API_KEY} を参照。対話的なローカル使用では hawk init --browser で認証情報を保存。キー値そのものは絶対にインライン化しないでください。
  • **orgId
原文(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 interactive local use, hawk init --browser stores credentials in ~/.hawk/hawk.properties — no env var needed for interactive sessions. Verify:

    hawk op status
    

    Any non-interactive session (CI, containers, headless agents): set HAWK_API_KEY. hawk op reads it directly — no config file, no browser.

  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. It fetches per-plugin detail for at most 10 plugins per call (the CLI prints "Fetching 10 plugin details"); for a scan with more alert types, drill the rest with --plugin-id, or read the scanner's own hawk scan --json-output file, which is the complete list.

→ 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} in any non-interactive session (CI, containers, headless agents); store credentials via hawk init --browser for interactive 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 による自動翻訳です。