stackhawk-hawkscan-ci

Rules for adding HawkScan, StackHawk’s web-application security scanner, to a continuous integration pipeline that runs checks automatically.

In plain words
What is it for?
It detects CI systems such as GitHub Actions, GitLab, Jenkins, or CircleCI and edits their pipeline configuration after a working local scan exists.
Why use it?
It prevents pipeline setup from proceeding when the local scan configuration is missing, invalid, or unfinished.

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
Clone the repo
git clone --depth 1 https://github.com/stackhawk/agent-skills

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 4,472 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00000 $0.04472
Opus 5 $0.00000 $0.02236
Sonnet 5 $0.00000 $0.00894
Haiku 4.5 $0.00000 $0.00447

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

Security

Grade A, and why

stackhawk-hawkscan-ci scanned grade A with 0 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor/.cursor/rules/stackhawk-hawkscan-ci.mdc · 340 lines

How it starts

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

HawkScan CI Skill

This skill graduates a working local HawkScan setup into a CI/CD pipeline. It is a wrapper around the local-scan path the hawkscan skill owns — it never generates stackhawk.yml, never picks auth recipes, never parses findings. Its scope is the pipeline file alone.

Hand-off rule: if stackhawk.yml doesn't exist or doesn't validate, the agent must invoke the hawkscan skill first. This skill does not onboard apps from scratch.


Step 0: Hand-off Check

Before doing anything CI-specific, confirm the local scan path is in place. Run:

test -f stackhawk.yml || echo "MISSING_CONFIG"
timeout 30 hawk validate config stackhawk.yml 2>&1 | head -20

If stackhawk.yml is missing, validation fails, or applicationId is still a placeholder (${APP_ID} with no real value, or literal your-app-id):

"I need a working local scan first. Run the hawkscan skill (or invoke it explicitly) to generate and validate stackhawk.yml, then come back here."

Stop. Do not proceed.


Step 1: Detect the CI Provider

Glob the repo for known CI config locations:

ls .github/workflows/*.yml .github/workflows/*.yaml 2>/dev/null
ls .gitlab-ci.yml 2>/dev/null
ls Jenkinsfile* 2>/dev/null
ls .circleci/config.yml 2>/dev/null
ls azure-pipelines*.yml 2>/dev/null
ls bitbucket-pipelines.yml 2>/dev/null
ls .buildkite/pipeline.yml 2>/dev/null
ls .travis.yml 2>/dev/null
ls -d bamboo-specs 2>/dev/null
ls concourse/*.yml 2>/dev/null
ls -d harness 2>/dev/null
ls appspec.yml buildspec.yml 2>/dev/null
Match Provider
.github/workflows/*.yml, *.yaml GitHub Actions
.gitlab-ci.yml GitLab CI/CD
Jenkinsfile, Jenkinsfile.* Jenkins
.circleci/config.yml CircleCI
azure-pipelines*.yml Azure Pipelines
bitbucket-pipelines.yml Bitbucket Pipelines
.buildkite/pipeline.yml Buildkite
.travis.yml Travis CI
bamboo-specs/ Bamboo
appspec.yml, buildspec.yml AWS CodeBuild / CodeDeploy
concourse/*.yml (heuristic — confirm with user) Concourse
harness/ Harness

Read the full file on GitHub · 340 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. 2d ago First seen · 340 lines · 0 tokens per session scan A 0af23349c7f6

Subscribe to this mod's changes

stackhawk-hawkscan-ci is a cursor rule published in the GitHub repository stackhawk/agent-skills (15 stars, last pushed 12d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,472 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.