agentleFS
abevzabevz/devops-skills/skills/dast-review/SKILL.md

dast-review

Skill0 starsChanged 41 days agoMITView on GitHub

Use when setting up or reviewing dynamic application security testing (DAST) for a web app or API — ZAP scan placement in CI/CD, authenticated scans, API scanning from an OpenAPI spec, and triaging DAST findings. Mention "DAST", "ZAP", "dynamic scan", "scan my API for vulns", "zap baseline" as triggers.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read scan config, target URL/environment, auth setup, exclusions, and reports.

    line 18
  2. Distinctive:

    Do not launch an active scan against production while reviewing a plan.

    line 22
  3. Distinctive:

    Follow the Workflow, Safety rules, and Quality checklist below.

    line 26
  4. Distinctive:

    Use when adding dynamic security testing to a running web app or HTTP API, or reviewing an existing DAST setup: where scans belong in the …

    line 36
  5. Distinctive:

    Only scan targets you are authorized to scan.

    line 100
  6. Distinctive:

    Never run an active scan against production or any environment with real user data — active payloads mutate and can destroy data.

    line 102
  7. Distinctive:

    Never echo captured secrets/session tokens from scan traffic in output — reference, don't quote.

    line 106

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

DAST Review

TL;DR checklist

  • Choose passive or active scanning for the intended stage.
  • Check target isolation, authentication, and scan scope.
  • Route findings to evidence-backed triage.

Key read-only checks

  • Read scan config, target URL/environment, auth setup, exclusions, and reports.

Common pitfalls

  • Do not launch an active scan against production while reviewing a plan.

Agent procedure

Follow the Workflow, Safety rules, and Quality checklist below.

Quick references

  • references/zap-usage.md

Last verified: unverified

When to use

Use when adding dynamic security testing to a running web app or HTTP API, or reviewing an existing DAST setup: where scans belong in the pipeline, how to authenticate them, how to scan an API from its OpenAPI spec, and how to turn results into action. ZAP is the default engine; the placement and triage logic apply to any DAST tool. Findings triage hands off to vulnerability-triage; the pipeline wiring side is cicd-review.

Goal

DAST that catches real runtime issues (injection, auth/session flaws, missing security headers, exposed endpoints) without blocking PRs on slow active scans or pointing an attack tool at production.

Workflow

  1. Match scan type to pipeline stage — the single most important decision:

    StageScanRuntimeBlocks?
    PRZAP baseline (passive: spider + passive rules, no attacks)~1–5 minYes — fast gate
    Merge to main / nightlyZAP full (active: injects payloads) against staging20–60+ minNo — report + triage
    API changeZAP api-scan from OpenAPI spec (+ Schemathesis for fuzzing)minutesPR-gate the passive part
    Scheduledfull active + auth against a dedicated scan environmentlongNo
  2. Never active-scan production — active scans send real attack payloads (SQLi strings, stored-XSS, path traversal) that create/mutate/delete data and can DoS the target. Active goes against staging or an ephemeral environment seeded with disposable data. Passive (baseline) against prod is safe-ish but still generates load — prefer staging.
  3. Authenticate the scan or it tests almost nothing — an unauthenticated scan only sees the login page. Configure auth (see references) so the scanner reaches the app behind login; verify it's actually authenticated (ZAP "Stats" / logged-in indicator) — a silently logged-out scan reports "clean" because it saw nothing.
  4. API-first for backend services — for a Go/JSON API there's no HTML to crawl. Drive the scan from the contract: zap-api-scan.py -t openapi.json -f openapi imports every endpoint; pair with Schemathesis (schemathesis run --checks all) for property-based fuzzing that finds 500s/contract violations ZAP won't. The OpenAPI spec must be complete or coverage is only as good as the spec.
  5. Tune the context before trusting results — scope (only in-scope hosts, or the scan wanders off to third parties), exclusions (logout URL — or the scanner logs itself out; destructive endpoints), and auth. An untuned scan is simultaneously noisy and low-coverage.
  6. Baseline the noise — DAST is false-positive-prone. Establish an accepted baseline (ZAP -c gen.conf / the config file marking known-acceptable alerts) so the PR gate fails only on new findings, not the same 12 informational headers every run.
  7. Gate on severity, report the rest — fail the PR only on High (and confirmed Medium); pass Low/Informational through as report annotations. A DAST gate that fails on informational findings gets disabled within a week.
  8. Triage findings — route confirmed findings into vulnerability-triage (dedupe, reachability/exploitability, suppression-with-expiry). DAST-specific: confirm before escalating — reflected content isn't always exploitable XSS; a 500 isn't always a vulnerability. Reproduce the request/response the tool flagged.

References

  • references/zap-usage.md — baseline/full/api-scan invocation, auth configuration (form/JSON/OIDC/header), CI wiring (GitHub Action + raw Docker), false-positive baselining with the config file, and the report/gate pattern.

Safety rules

  • Only scan targets you are authorized to scan. Scanning systems you don't own or lack written permission for is illegal — confirm ownership/authorization before proposing any active scan.
  • Never run an active scan against production or any environment with real user data — active payloads mutate and can destroy data. Propose staging/ephemeral targets.
  • This skill designs and reviews scans; do not launch scans against a live target without the user's explicit go-ahead and confirmed authorization.
  • Never echo captured secrets/session tokens from scan traffic in output — reference, don't quote.

Output format

For setup/review:

## Scan placement (per stage: type, target env, gate/report)
## Authentication approach
## Scope & exclusions
## Findings gate policy (fail-on severity vs report)
## Proposed config/CI (ZAP invocation, for user review)
## Gaps

For triaging a scan report: hand off to vulnerability-triage format, adding a "confirmed-reproducible?" note per finding.

Quality checklist

  • Active scans are targeted at staging/ephemeral, never production or real data
  • Authorization to scan the target was confirmed
  • The scan is authenticated (or its absence is a stated, deliberate limitation)
  • API scans are driven from the OpenAPI spec, not blind crawling
  • PR gate fails only on new High findings, not the informational baseline
  • No scan was launched without explicit user go-ahead

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.