stackhawk-hawkscan-ci-execution-shapes

A guide to running HawkScan, a web-application security scanner, in automated build pipelines. It compares a GitHub Actions action, a Docker image, and a downloaded command-line program across common CI providers.

In plain words
What is it for?
Use it to add HawkScan to GitHub Actions, GitLab, Jenkins, CircleCI, Azure Pipelines, Bitbucket, Buildkite, Travis, or AWS CodeBuild, including API-key handling and scan-result uploads.
Why use it?
It helps choose a scan method that fits the build system and clarifies tradeoffs such as Docker availability, localhost networking, result formats, and version pinning.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/stackhawk/agent-skills/stackhawk-hawkscan-ci-execution-shapes
Clone the repo
git clone --depth 1 https://github.com/stackhawk/agent-skills

Made for: Cursor.

Per session 79 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,309 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00079 $0.03309
Opus 5 $0.00039 $0.01655
Sonnet 5 $0.00016 $0.00662
Haiku 4.5 $0.00008 $0.00331

Measured 3d ago against content hash ef71a876c8bc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

stackhawk-hawkscan-ci-execution-shapes scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

**Gotchas:** the `jenkins` user must be in the `docker` group on the controller/agent (`sudo usermod -aG docker jenkins && sudo systemctl restart jenkins`). Otherwise the Docker invocation fails with "permission denied w

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| **3. Binary download** | resolve the platform URL from `hawk.manifest.json`, then `curl -fsSL "$url" -o hawk && chmod +x hawk` | No Docker required. Lightest footprint. **Self-contained binary — no Java needed.** | Mus
cursor/.cursor/rules/stackhawk-hawkscan-ci-execution-shapes.mdc · 333 lines

How it starts

The opening of the file, as written. The whole thing — 333 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Execution Shapes Reference

This reference covers the three ways CI pipelines invoke HawkScan, per-provider quick-reference recipes for setting the API key secret, and provider-specific gotchas.

The Three Tiers

Tier Mechanism Pros Cons When to use
1. Native action stackhawk/[email protected] Richest input surface (SARIF upload, PR comments, Code Scanning, commitShaCheck, multi-file overlays). One-line invocation. Network plumbing for localhost handled automatically. GitHub Actions only. GitHub Actions runners.
2. Docker image docker run stackhawk/hawkscan:latest Works in any runner with Docker. Same binary as production scans. :latest tracks the newest stable scanner. Networking-to-localhost requires --network host (Linux) or host.docker.internal (Mac/Windows runners). DinD setup on GitLab. Anywhere Docker is available — GitLab, Jenkins, CircleCI, Azure, Bitbucket, Buildkite, AWS CodeBuild.
3. Binary download resolve the platform URL from hawk.manifest.json, then curl -fsSL "$url" -o hawk && chmod +x hawk No Docker required. Lightest footprint. Self-contained binary — no Java needed. Must resolve the platform URL from the manifest. Slower bootstrap than image pull on warm cache. Bare shell runners with no Docker — some Travis configs, restricted Spinnaker stages, locked-down corporate runners.

Versioning Strategy

Use :latest for the StackHawk scanner image. HawkScan is a security scanner — the newest stable build carries the latest checks and detections, so CI should track it rather than freeze on an older release. StackHawk publishes stackhawk/hawkscan:latest as the current stable release.

Mechanism Recommended Notes
Scanner image stackhawk/hawkscan:latest Newest stable scanner — best detection coverage.
Native action stackhawk/hawkscan-action@v2 Major pin auto-receives the newest action within v2.
Binary download resolve from hawk.manifest.json (.latest.version + asset .url) Downloads the current stable single-binary CLI.

Read the full file on GitHub · 333 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 333 lines · 79 tokens per session scan B ef71a876c8bc

Subscribe to this mod's changes

stackhawk-hawkscan-ci-execution-shapes is a cursor rule published in the GitHub repository stackhawk/agent-skills (16 stars, last pushed 12d ago), licensed MIT. It adds 79 tokens to every session and 3,309 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.