stackhawk-api-recipes Cursor ruleA

stackhawk-api-recipes from stackhawk/agent-skills is a Cursor rule: instructions the Cursor agent follows in that repo.

Install it, pinned
mdr add stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-api-recipes.mdc@git:20260914.dee6251

Pins git:20260914.dee6251 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
Cursor rule
Repository
stackhawk/agent-skills
Path
cursor/.cursor/rules/stackhawk-api-recipes.mdc
Versions recorded
4
Latest version
git:20260914.dee6251, committed Sep 14, 2026
First version recorded
Apr 2, 2026
Size
12,238 bytes
Repository stars
16
License
MIT

StackHawk API reporting recipes: org security posture summary, app deep dive (scan -> alerts -> findings), stale apps detection, scan diff (what changed since last scan). Pre-built compositions using hawk op commands. Prefer hawk op shortcuts (stackhawk-api-hawk-op) for the deep-dive chain; use these recipes for the per-env untriaged posture view.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# StackHawk API Reporting Recipes

Pre-built compositions for common security reporting questions using `hawk op`.
Run `hawk op status` first to confirm authentication; set `HAWK_API_KEY` in any
non-interactive session (CI, containers, headless agents).

**Setup (run once per shell session when non-interactive):**

```bash
export HAWK_API_KEY="hawk.xxxxxxxxxxxx"   # from app.stackhawk.com → Settings → API Keys
```

---

## Recipe 1: Org Security Posture

**Question:** Across all my apps, what is the current security situation?

**What it produces:** One row per app showing latest-scan finding counts by
severity, sorted by High findings descending.

### Step 1 — Fetch all apps and recent scans

```bash
apps=$(hawk op app list --format json)
scans=$(hawk op scan list --limit 500 --format json)
```

### Step 2 — Build the posture table

```bash
# Join latest scan per app to get severity counts
printf '%s\n%s' "${apps}" "${scans}" | jq -rs '
  .[0] as $apps | .[1] as $scans |

  # Build app name lookup: applicationId -> name
  ($apps.data | map({(.id): .name}) | add // {}) as $names |

  # Find latest completed scan per app
  ($scans.data
    | group_by(.applicationId)
    | map(
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-api-recipes.mdc@sha256:86d1c7fa34c0feb1

The line at the top of this page pins the label git:20260914.dee6251, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ed7g6aqawjmthc67.svg)](https://markdownregistry.com/a/art_ed7g6aqawjmthc67)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 4 versions of this file, between Apr 2, 2026 and Sep 14, 2026, about one every 55 days.

versioncommittedcommitsizeaudit
git:20260914.dee6251 latest2026-09-14 dee6251 12,238 BA view · diff
git:20260630.b97573a2026-06-30 b97573a 12,182 BA view · diff
git:20260422.3b517c72026-04-22 3b517c7 15,920 BA view · diff
git:20260402.ae6802b2026-04-02 ae6802b 15,790 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (12238 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

stackhawk/agent-skills · 16 stars · license MIT · pushed 2026-11-06 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ed7g6aqawjmthc67
GET https://markdownregistry.com/api/v1/resolve?ref=stackhawk/agent-skills/cursor/.cursor/rules/stackhawk-api-recipes.mdc
GET https://markdownregistry.com/api/v1/blob/86d1c7fa34c0feb1ff481d5f63f0e89941cc6b996151a7e7491b6992b316d36d

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: Cursor rules vs AGENTS.md · which agent file does what.

More from stackhawk/agent-skills

skill-authoring SKILL.md skill
stackhawk/agent-skills · .claude/skills/skill-authoring/SKILL.md · Guides authoring and maintaining agent skills in this repository — enforcing Anthropic best practices, release-version…
v1.1.0 · audit A · 16 stars
AGENTS.md AGENTS.md file
stackhawk/agent-skills · AGENTS.md
git:20261028.d9c66cc · audit A · 16 stars
CLAUDE.md CLAUDE.md file
stackhawk/agent-skills · CLAUDE.md
git:20260926.400c868 · audit B · 16 stars
stackhawk-api-hawk-op Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-api-hawk-op.mdc · hawk op shortcuts for the StackHawk API: user intent → single hawk op command mapping for scan drill-down…
git:20260914.5fe0d68 · audit A · 16 stars
stackhawk-api Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-api.mdc · Use when querying the StackHawk platform for security reporting, findings analysis, or app management. Triggers include…
git:20260914.7edcfdc · audit A · 16 stars
stackhawk-data-seed Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-data-seed.mdc · Use when the user says "set up data for HawkScan", "my scan has no data to hit", "seed this repo for scanning", or as a…
git:20260708.5dcc3eb · audit A · 16 stars
stackhawk-hawkscan-ci-app-startup Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-hawkscan-ci-app-startup.mdc · HawkScan CI app-startup patterns reference: Docker Compose + wait-for-it, GitLab services keyword, GitHub Actions…
git:20260610.e0f728f · audit A · 16 stars
stackhawk-hawkscan-ci-execution-shapes Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-hawkscan-ci-execution-shapes.mdc · HawkScan CI execution shapes reference: native action (stackhawk/hawkscan-action) vs Docker image (stackhawk/hawkscan)…
git:20260630.b97573a · audit A · 16 stars
stackhawk-hawkscan-ci-failure Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-hawkscan-ci-failure.mdc · HawkScan CI failure semantics reference: exit codes 0/1/42, failureThreshold tuning, block-on-42 vs warn-only vs…
git:20260630.b97573a · audit A · 16 stars
stackhawk-hawkscan-ci Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-hawkscan-ci.mdc · Use when the user wants to WIRE HawkScan into a CI/CD pipeline config file — triggers on "set up hawkscan in CI", "add…
git:20260918.09d070f · audit A · 16 stars
stackhawk-hawkscan-cli Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-hawkscan-cli.mdc · hawk CLI reference: scan commands and flags (--json-output, --verbose, --debug, --trace), validate commands (config…
git:20260914.7edcfdc · audit A · 16 stars
stackhawk-hawkscan-config Cursor rule
stackhawk/agent-skills · cursor/.cursor/rules/stackhawk-hawkscan-config.mdc · stackhawk.yml cross-cutting config patterns: env var interpolation (${VAR:default}, whole-value rule)…
git:20260926.36b2a3f · audit A · 16 stars

Every file in stackhawk/agent-skills

Browse by kind, by grade A, or by owner.