このスキルは、ユーザーまたはエージェントがStackHawkプラットフォームに対して、セキュリティレポート、検出結果の分析、またはアプリ管理について照会する必要がある場合に使用します。 **次のような場合に使用:** 「stackhawk api」「セキュリティの現状」「検出結果レポート」「検出結果を表示」「未処理の検出結果」「どのアプリ」「スキャン履歴」「セキュリティダッシュボード」「優先度付け」「注意が必要な項目」など すべてのプラットフォーム照会には、hawk CLI(コマンドラインツール)の `hawk op` サブコマンドを使用します。 **使用しない場合:** - スキャン実行(「アプリをスキャンして」「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.
このスキルにより、Claude は StackHawk プラットフォームに対するセキュリティ報告エージェント(監視・報告をおこなう自動化ツール)として機能します。基本的な流れは次のとおりです:
質問 → 認証 → hawk op 経由で API クエリ → 結果表示 → 次のアクション提案
すべてのプラットフォームクエリは hawk バイナリの op サブツリー(hawk op …)を通じて実行されます。認証、トークン更新、ページネーション(複数ページの自動処理)、および安定した JSON 出力を処理します。生の REST API フォールバックはありません。hawk が利用できない場合は、手動で curl を実行するのではなく、インストールして hawk init --browser を実行してください。
詳細は references/hawk-op-shortcuts.md を参照してください。
API を呼び出す前に、何が利用可能か確認します:
hawk はインストールされ、設定されているか? (hawk version で v6.0.0 以上を報告)
# CLI 使用統計の駆動スキルを識別(hawk/hawkop により読み取られます)
export _STACKHAWK_SKILL=api
command -v hawk >/dev/null && hawk op status
hawk init --browser を実行(対話型;統合バイナリには hawk op init がないため、hawk init が ~/.hawk/hawk.properties に書き込み、hawk op がそれと HAWK_API_KEY 環境変数を読み込みます)hawk CLI をインストールするよう指示(ドキュメント:docs.stackhawk.com)して中止します。curl へのフォールバックは してはいけませんhawk op は認証されているか? ローカルで対話的に使用する場合、hawk init --browser は認証情報を ~/.hawk/hawk.properties に保存します。対話型セッションでは環境変数は不要です。確認:
hawk op status
非対話型セッションの場合(CI、コンテナ、ヘッドレスエージェント):
HAWK_API_KEYを設定してください。hawk opはそれを直接読み込みます。設定ファイルもブラウザも不要です。
orgId(組織 ID)は判明しているか? ほとんどのエンドポイントで必須です。
hawk op org get はアクティブな組織の UUID を返しますhawk op org set <ID> でデフォルト組織を切り替えますユーザーの意図に基づいてルーティング:
| ユーザーが言った場合 | 次のステップ |
|---|---|
| 「自分のセキュリティ状況は?」または「ダッシュボード」 | ステップ 3(組織概要) |
| 「[アプリ]の検出内容を教えて」または「何に注意が必要?」 | ステップ 4(アプリ詳細分析) |
| 「最近スキャンされていないアプリは?」 | ステップ 3(古いアプリに焦点) |
| 「先週から何が変わった?」または「新しい内容は?」 | ステップ 4(差分比較) |
| 「未分類の検出内容を表示」 | ステップ 3、その後ステップ 4 で該当アプリをドリルダウン |
対話型セットアップの場合、hawk init --browser を一度実行します。CLI は認証情報を ~/.hawk/hawk.properties に保存し、hawk op がトークン更新と 401 エラーの再試行をすべてのコール時に処理します。このスキルでは以降の認証作業は不要です。
→ セットアップコマンド全体(インストール、CI 環境変数、組織切り替え用プロファイル):
references/hawk-op-shortcuts.md
目的: ユーザーにすべてのアプリと環境全体のセキュリティ状況の全体像を提供します。
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 | Production | 3 | 7 | 12 | 2024-01-15 |
| Auth Service | Staging | 0 | 2 | 4 | 2024-01-10 |
applicationId → アプリ名は hawk op app list --format json で解決します。
startedTimestamp が 30 日以上前 —— 「最近のスキャンなし」とマークhighAlertCount > 0 の環境を降順でソートstatus が COMPLETED でない —— 設定の問題を示唆している可能性フラグが付いたアプリへのドリルダウンを提案:
jq 変換を含む完全なレシピ:
→ references/reporting-recipes.md
目的: 単一アプリの特定の検出内容の詳細情報を取得します。何が見つかったか、どこか、その意味は何か。
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 に従う)、および修復方法をまとめて JSON で返します。1 回のコールでプラグインごとの詳細情報を最大 10 プラグインまでフェッチします(CLI は「Fetching 10 plugin details」と出力);アラータイプがそれ以上のスキャンの場合、--plugin-id でドリルダウンするか、スキャナ自身の hawk scan --json-output ファイルを読んでください(完全なリスト)。
→ 特定のスキャン ID、単一アラート/単一 URI ドリルダウン、--max-findings チューニング:
references/hawk-op-shortcuts.md §2
構造化されたサマリーを表示:
プラットフォーム上のスキャンへのリンク:
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
app.stackhawk.com/scans/{scanId})を含めるNEW、FALSE_POSITIVE、RISK_ACCEPTED、ASSIGNED)を表示データが示す内容に基づいて提案:
| 検出内容 | 推奨アクション |
|---|---|
| 高重大度の検出内容あり | 即座の修復を推奨;検出内容の詳細を → hawkscan スキル に渡して再スキャンし修正を確認することを提案 |
| 古いアプリ(30 日以上スキャンされていない) | 新しいスキャンの実行を推奨 → hawkscan スキル |
| すべての環境でクリーン | パス数が少ない可能性があることに注意;スパイダーのチューニングが必要かもしれません → hawkscan スキル、設定パターンリファレンス |
未分類の検出内容(status: NEW) |
プラットフォームでトリアージを実行するよう指示:app.stackhawk.com —— トリアージの書き込み操作はこのスキルの対象外 |
ENV_INCOMPLETE アプリステータス |
プラットフォームで環境設定を完了するよう指示 |
API データ(このスキル)を使用する場合:
プラットフォーム UI に指示する場合:
hawk op scan get <SCAN_ID> --uri-id <ID> --message を使用)${HAWK_API_KEY} を参照;対話型ローカル使用では hawk init --browser 経由で認証情報を保存;キーの値をインラインにしてはいけませんorgId と appId を混同しない —— hawk op scan list --app <APP_ID> はアプリの UUID を取得します。組織は設定から暗黙的;必要に応じて --org <ID> でオーバーライド。混合するとエラーではなく空の結果が返されます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.
Before making any calls, check what's available:
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
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).hawk CLI (docs:
docs.stackhawk.com) and stop; do not fall back to curl.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 opreads it directly — no config file, no browser.
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.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 |
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.
Goal: Give the user a bird's-eye view of security health across all apps and environments.
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.
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.
startedTimestamp older than 30 days — flag as "No recent scan"highAlertCount > 0, sorted descendingstatus not COMPLETED — may indicate config issuesOffer to drill down on any flagged app:
Full recipe with jq transforms:
→ references/reporting-recipes.md
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.
Show a structured summary:
Link to the scan on the platform:
https://app.stackhawk.com/scans/{scanId}
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.
app.stackhawk.com/scans/{scanId}) whenever referencing a specific scanNEW, FALSE_POSITIVE, RISK_ACCEPTED, ASSIGNED) alongside each findingBase 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 |
Use API data (this skill) when:
Direct to platform UI when:
hawk op scan get <SCAN_ID> --uri-id <ID> --message)${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.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.--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 による自動翻訳です。