/devsecops-skills:dast-integrationfrom devsecops-skills
Guides adding DAST scanning to CI/CD or scheduled pipelines using OWASP ZAP or Nuclei against running web apps/APIs. Covers setup, tuning, and safe active vs passive scan strategies.
Ships in devsecops-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Dynamic Application Security Testing (DAST) exercises a running application from the outside — sending crafted HTTP requests and observing responses — to find vulnerabilities that only manifest at runtime: broken authentication/session handling, security misconfiguration (missing headers, verbose error pages, exposed debug endpoints), server-side request forgery, injection flaws reachable through the actual request/response path, and issues in how components are wired together in a deployed environment. Because it treats the app as a black box, DAST finds a different, often complementary, class of issues to SAST (which reads source but never sees runtime config or deployment topology) and SCA (which reads dependency manifests but never exercises the app). Integrating DAST into CI/CD or a recurring pipeline turns this from an occasional pentest activity into continuous, automated feedback against every staging deploy.
zaproxy/zap-stable container image, current stable line
2.15.x as of this writing) — the most common open-source DAST tool,
usable via the zap-baseline.py (passive-only, fast, safe for CI) or
zap-full-scan.py (active, slower, more intrusive) wrapper scripts, or
its Automation Framework YAML for finer control.Start with a passive/baseline scan against a staging or PR-preview environment — it only observes traffic and crawls passively, so it's safe to run frequently and unattended:
# GitHub Actions
name: dast-baseline
on:
pull_request:
jobs:
zap-baseline:
runs-on: ubuntu-latest
steps:
- name: ZAP Baseline Scan
uses: zaproxy/[email protected]
with:
target: 'https://pr-${{ github.event.number }}.staging.example.internal'
rules_file_name: '.zap/rules.tsv'
cmd_options: '-a'
Seed the scan with an API spec for better coverage of non-linked endpoints:
docker run --rm -v "$(pwd)":/zap/wrk/:rw \
-t zaproxy/zap-stable zap-api-scan.py \
-t https://staging.example.internal/openapi.json \
-f openapi \
-r zap-api-report.html
Add authenticated scanning for endpoints behind login, using a dedicated test account and a ZAP authentication script or context file — never scan authenticated flows with production customer credentials. Store test credentials as CI secrets, not inline:
env:
DAST_TEST_USER: ${{ secrets.DAST_TEST_USER }}
DAST_TEST_PASSWORD: ${{ secrets.DAST_TEST_PASSWORD }}
Reserve active/full scans for a scheduled job against a dedicated test environment, not every PR — active scans send exploit-style payloads and can be slow and disruptive:
name: dast-full-nightly
on:
schedule:
- cron: '0 3 * * *'
jobs:
zap-full:
runs-on: ubuntu-latest
steps:
- uses: zaproxy/[email protected]
with:
target: 'https://dast-test.example.internal'
rules_file_name: '.zap/rules.tsv'
Triage findings by confidence and risk, not raw count. ZAP reports Risk (High/Medium/Low/Informational) and Confidence separately — gate on High-risk + High/Medium-confidence findings first, and route low-confidence results to manual review instead of auto-failing on them.
Tune out known-noisy rules via a rules file rather than ignoring whole scan categories:
# .zap/rules.tsv — format: <rule id>\t<threshold>\t<comment>
10202 IGNORE Absence of Anti-CSRF Tokens - false positive, API uses bearer tokens not cookies
10096 WARN Timestamp disclosure - low risk, internal staging only
Feed results into the same triage workflow as SAST/SCA (SARIF export, ticket auto-creation, PR comments) so security findings live in one place rather than three disconnected dashboards.
Symptom: DAST scan reports dozens of "false positive" injection findings on pages that require login, because the scanner never authenticated and only saw the login page. Fix: Configure authenticated scanning (ZAP context + auth script, or a pre-authenticated session cookie/token injected via scan config) using a dedicated test account, not anonymous crawling.
Symptom: An active scan run against a shared staging environment corrupts test data, sends real emails via a working SMTP integration, or trips a third-party sandbox's rate limits. Fix: Run active scans only against an isolated environment with outbound integrations stubbed or pointed at sandboxes (fake SMTP, sandboxed payment processor, mocked third-party APIs), never a shared staging environment other teams depend on.
Symptom: The DAST job routinely times out or takes over an hour, blocking the pipeline. Fix: Split into a fast passive/baseline scan on every PR and a separate scheduled full/active scan outside the critical path (nightly cron), and scope the full scan's crawl depth/exclusions to avoid scanning unrelated subdomains or huge static asset trees.
Symptom: CSRF-token or anti-automation protections cause the scanner to get stuck on the login form and never proceed past it. Fix: Use a scripted authentication flow (ZAP authentication scripts, or a pre-generated session token injected as a header/cookie) instead of relying on the scanner to fill and submit the login form itself.
Symptom: Every scan run reports a slightly different set of findings, making it hard to tell if anything regressed. Fix: Pin the scanner version/image, fix the rules/policy file in version control, and run against a stable, seeded test dataset rather than a staging environment with constantly-changing data.
A team adds a ZAP baseline scan to every PR preview deploy, plus a scheduled full scan against a dedicated DAST test environment.
.zap/rules.tsv:
10202 IGNORE Anti-CSRF token check - API is bearer-token auth, no cookies used
10096 WARN Timestamp disclosure in response headers - internal env only
.github/workflows/dast.yml:
name: dast
on:
pull_request:
schedule:
- cron: '0 3 * * *'
jobs:
baseline:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ZAP baseline scan against PR preview
uses: zaproxy/[email protected]
with:
target: 'https://pr-${{ github.event.number }}.staging.example.internal'
rules_file_name: '.zap/rules.tsv'
fail_action: true
full-scan:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ZAP authenticated full scan against dedicated DAST env
uses: zaproxy/[email protected]
with:
target: 'https://dast-test.example.internal'
rules_file_name: '.zap/rules.tsv'
env:
ZAP_AUTH_USER: ${{ secrets.DAST_TEST_USER }}
ZAP_AUTH_PASSWORD: ${{ secrets.DAST_TEST_PASSWORD }}
Sample high-risk finding from a baseline run:
WARN-NEW: X-Frame-Options Header Not Set [10020]
x 3 URLs (clickjacking risk on unframed pages)
FAIL-NEW: SQL Injection - Time Based [40018]
x 1 URL: https://pr-482.staging.example.internal/api/search?q=
Remediation: add X-Frame-Options: DENY (or CSP frame-ancestors) at the
reverse proxy/app middleware layer for the header finding, and for the
SQLi finding, trace q through /api/search to confirm it reaches a raw
query — fix with a parameterized query and re-run the baseline scan to
confirm the finding clears.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin devsecops-skills17 skills in this plugin
/checkov-and-tfsec-iac-security-scanningConfigures Checkov and tfsec to scan Terraform/CloudFormation/Kubernetes IaC source for misconfigurations — hardcoded secrets, overly permissive IAM policies, unencrypted storage, open security groups — before `terraform apply` or `aws cloudformation deploy` ever runs. Use when a user asks to "scan my Terraform for security issues," "add Checkov/tfsec to CI," "find overly permissive IAM in my IaC," "write a Checkov suppression," "compare Checkov and tfsec," or "catch misconfigured cloud resources before they're provisioned."
/complete-devsecops-pipeline-for-kubernetes-from-scratchBuilds the complete security-gate sequence for a Kubernetes-targeted DevSecOps pipeline from scratch — SAST, SCA, container image scanning, a policy-as-code (OPA/Kyverno) admission gate placed before the GitOps handoff, and a secrets model where plaintext credentials never touch the pipeline because an External Secrets Operator pulls them cluster-side instead. Use when the user asks to "build a DevSecOps pipeline for Kubernetes from scratch," "add a policy gate before our GitOps commit," "make sure secrets never touch CI for our K8s deploys," or "sequence SAST/SCA/image-scan/policy gates for a container pipeline end-to-end."
/complete-devsecops-pipeline-for-serverless-from-scratchBuilds the complete security-gate sequence for a serverless (Lambda- style) DevSecOps pipeline from scratch — SAST, SCA against a much larger bundled transitive-dependency surface, package/artifact signing, and least-privilege execution-role scoping as the primary release gate (rather than a Kubernetes-style admission policy), with runtime secrets fetched from a managed secrets service instead of baked into the deployment package. Use when the user asks to "build a DevSecOps pipeline for a Lambda function from scratch," "gate a serverless release on execution-role scope instead of admission policy," "sign a Lambda deployment package," or "make sure a Lambda function's secrets aren't baked into its zip."
/complete-devsecops-pipeline-for-vm-based-workloads-from-scratchBuilds the complete security-gate sequence for a VM-based DevSecOps pipeline from scratch — SAST, SCA, golden-image scanning and CIS benchmark hardening baked into the machine image itself, config- management-applied secrets via Ansible Vault (never plaintext), and an ongoing patch/drift-detection gate that runs independently of any single deploy, distinct from the per-deploy scanning in the Kubernetes and serverless variants. Use when the user asks to "build a DevSecOps pipeline for EC2/VM workloads from scratch," "harden a golden AMI to CIS benchmarks in the pipeline," "apply secrets with Ansible Vault instead of plaintext," or "add ongoing patch/drift detection for a VM fleet."
/container-image-hardeningGuides building minimal, non-root, hardened container images — multi-stage builds, distroless/minimal base images, non-root users, read-only root filesystems, dropped Linux capabilities, and pinned/ digest-referenced base images. Use when the user asks to "harden this Dockerfile", "reduce container image attack surface/size", "make our container run as non-root", "switch to a distroless base image", "fix a container security scan finding about running as root or having a shell", or "set Kubernetes securityContext restrictions for a pod".
/critical-vulnerability-emergency-responseGuides the accelerated, out-of-band response when a critical CVE is publicly disclosed in a widely-used dependency, library, or platform component — rapid exposure assessment across the fleet, patch or temporary mitigation, verification, and closeout. Use when the user says "a critical CVE just dropped in X", "we need to check if we're affected by CVE-YYYY-NNNNN", "log4shell-style emergency patching", "zero-day just disclosed in our dependency", or "run an emergency vulnerability response". Distinct from the steady-state finding-queue management in security-finding-backlog-triage — this is the fire-drill process for one urgent, time-critical disclosure.
Other plugins' skills for the same job