From api
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". Do NOT use for scanning — use the hawkscan skill for "scan my app", "hawkscan", "stackhawk.yml", "DAST".
How this skill is triggered — by the user, by Claude, or both
Slash command
/api:apiThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill enables Claude to act as a security reporting agent against the StackHawk
This skill enables Claude to act as a security reporting agent against the StackHawk platform REST API. The core workflow is:
Question → Authenticate → Query API → Present Results → Suggest Next Actions
Before making any API calls, gather what you know:
Is HAWK_API_KEY set? Required for all calls. If missing:
export HAWK_API_KEY=hawk.xxxxxxxxxxxxIs orgId known? Required for most endpoints. If unknown:
jq -r '.organization.id' on the /auth/login response bodyexport ORG_ID=<uuid>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 |
For one-off queries, get a token inline and proceed:
HAWK_TOKEN=$(curl -s -H "X-ApiKey: ${HAWK_API_KEY}" \
https://api.stackhawk.com/api/v1/auth/login | jq -r '.token')
Verify the token was captured before making further calls:
[[ -z "${HAWK_TOKEN}" || "${HAWK_TOKEN}" == "null" ]] && \
echo "ERROR: auth failed — check HAWK_API_KEY" && exit 1
For reporting workflows that make many API calls, use the reusable helper. It handles token caching, 401 auto-retry, and full pagination:
→ references/api-auth.md
401 responses and re-authenticateorgId is in the login response under .organization.id — capture it on first authGoal: Give the user a bird's-eye view of security health across all apps and environments.
GET /api/v2/org/{orgId}/envs
Use this endpoint because it returns untriaged finding counts baked in per environment — no need to fetch individual scans just to get severity totals.
hawk_api GET "/api/v2/org/${ORG_ID}/envs?pageSize=100"
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 |
Fields: applicationId (resolve to app name via apps endpoint), environmentName,
lastScanHighUntriaged, lastScanMediumUntriaged, lastScanLowUntriaged,
lastScanTimestamp.
lastScanTimestamp older than 30 days — flag as "No recent scan"lastScanHighUntriaged > 0, sorted descendinglastScanStatus not COMPLETED — may indicate config issuesOffer to drill down on any flagged app:
Full recipe with jq transforms:
→ references/reporting-recipes.md
Full endpoint field reference:
→ references/api-endpoints.md (Section 3: Environments)
Goal: Get specific finding details for a single app — what was found, where, and what it means.
You cannot get findings in a single call. Follow this chain:
Step 1: List scans GET /api/v1/scan/{orgId} → extract scanId
Step 2: List alerts GET /api/v1/scan/{scanId}/alerts → extract pluginId
Step 3: List findings GET /api/v1/scan/{scanId}/alert/{pluginId}
Step 1 — Get the most recent scan for the target app:
# List scans, filter to the target appId, take the most recent
hawk_api GET "/api/v1/scan/${ORG_ID}?pageSize=50" | \
jq --arg app "${APP_ID}" \
'[.applicationScanResults[] | select(.applicationId == $app)] | first'
Extract: scanId, highAlertCount, mediumAlertCount, lowAlertCount, startedTimestamp
Step 2 — Get alerts for that scan:
hawk_api GET "/api/v1/scan/${SCAN_ID}/alerts"
Extract per alert: pluginId, alertName, severity, affectedUriCount, cweId
Step 3 — Get affected paths per alert:
hawk_api GET "/api/v1/scan/${SCAN_ID}/alert/${PLUGIN_ID}"
Extract per finding: uri, method, triageStatus, parameter
Show a structured summary:
Link to the scan on the platform:
https://app.stackhawk.com/scans/{scanId}
When the user asks what's new or what changed since last scan, compare two scans:
scanIds for the app from Step 1pluginId sets — new alerts are those in scan N but not scan N-1Full recipe:
→ references/reporting-recipes.md
Full endpoint field reference:
→ references/api-endpoints.md (Section 4: Scan Results Drill-Down Chain)
app.stackhawk.com/scans/{scanId}) whenever referencing a specific scanNew, Accepted, False Positive, Reopened) 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 (triageStatus: 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_API_KEY}. Never inline the key value.orgId with appId — /api/v1/scan/{orgId} takes the org UUID, not the app UUID. Mixing these returns empty results, not an error.401 mid-session, re-authenticate and replay the failed request. The helper script handles this automatically.npx claudepluginhub stackhawk/agent-skills --plugin stackhawk-apiAudits web applications against OWASP Top 10 (2021) vulnerabilities with quick and deep scan modes, outputting actionable findings per category.
This skill should be used when the user asks to "triage security findings", "fix a Checkmarx finding", "review SonarCloud results", "dismiss a false positive", "check code scanning alerts", or needs to work with GitHub Advanced Security alerts, scanner annotations on PRs, or Grype vulnerability results.
Validates and triages Hacktron security findings against source code and optionally a live deployment, distinguishing true/false positives, adjusting severity, and committing fixes or updating states via the Hacktron REST API.