/security-tooling-skills:owasp-zap-dast-configurationfrom security-tooling-skills
Guides deep configuration of OWASP ZAP for automated dynamic scanning — baseline vs full active scan selection, Automation Framework YAML plans, authenticated scanning via scripts/contexts, and API-driven scans from OpenAPI specs.
Ships in security-tooling-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.
OWASP ZAP is the most widely used open-source dynamic scanner, and its
practical value depends entirely on configuration most teams get wrong
on the first attempt: running the intrusive full/active scan against
the wrong environment, letting the crawler get stuck on an
unauthenticated login page, or trusting a default alert threshold that
buries three real findings under forty low-confidence ones. This skill
goes deep on ZAP's specific mechanics — the baseline vs. full scan
distinction, the declarative Automation Framework YAML that has
superseded ad-hoc zap-baseline.py/zap-full-scan.py invocations in
current ZAP, writing authentication scripts/contexts so authenticated
areas actually get scanned, and seeding a scan from an OpenAPI spec. For
the general DAST concept — why dynamic scanning matters, where it fits
relative to SAST/SCA, and vendor-neutral CI wiring — see
dast-integration.
zap-baseline.py (passive-only) and
zap-full-scan.py/an active-scan automation job, and needs the
concrete difference in what each does and is safe to run against.-config/rules file) to cut noise without disabling whole scan
categories.zap-baseline.py, zap-api-scan.py, zap-full-scan.py) to
the current ZAP Automation Framework YAML format.2.15.x (current stable line as of this writing) via the
zaproxy/zap-stable container image, or the desktop/daemon
distribution. The Automation Framework (zap.yaml plans, invoked via
zap.sh -cmd -autorun plan.yaml or the zap-x.py wrapper's
-autorun mode) is the current recommended entry point over the
older per-mode Python scripts, which remain available but receive
less active development attention.Understand the scan-type spectrum before picking one:
zap-baseline.py, or an Automation Framework plan
with only a passiveScan-wait job after spidering) — spiders the
app and passively observes traffic; sends no attack payloads; safe
to run frequently, even against a shared or lightly-loaded
environment.zap-full-scan.py, or a plan with an
activeScan job) — after spidering, actively sends exploit-style
payloads (SQLi, XSS, path traversal probes) to every discovered
parameter; can create data, trigger side effects, and is
meaningfully slower. Restrict to isolated test/staging
environments.zap-api-scan.py, or an openapi/graphql import
job) — seeds the crawl from a spec instead of link-following,
since APIs usually have few or no HTML links to discover from.Write an Automation Framework plan instead of chaining CLI flags — it is declarative, version-controllable, and the current recommended interface:
# zap-plan.yaml
env:
contexts:
- name: "checkout-service"
urls:
- "https://staging.example.internal"
authentication:
method: "script"
parameters:
script: "/zap/scripts/auth/checkout-login.js"
scriptEngine: "Oracle Nashorn"
sessionManagement:
method: "cookie"
users:
- name: "dast-test-user"
credentials:
username: "${DAST_TEST_USER}"
password: "${DAST_TEST_PASSWORD}"
parameters:
failOnError: true
progressToStdout: true
jobs:
- type: spider
parameters:
context: "checkout-service"
user: "dast-test-user"
maxDuration: 10
- type: passiveScan-wait
parameters:
maxDuration: 5
- type: activeScan
parameters:
context: "checkout-service"
user: "dast-test-user"
policyDefinition:
defaultStrength: "medium"
defaultThreshold: "medium"
- type: report
parameters:
template: "traditional-html"
reportDir: "/zap/wrk"
reportFile: "zap-report"
- type: exitStatus
parameters:
errorLevel: "High"
warnLevel: "Medium"
Run it:
docker run --rm -v "$(pwd)/zap:/zap/wrk:rw" \
-e DAST_TEST_USER -e DAST_TEST_PASSWORD \
-t zaproxy/zap-stable zap.sh -cmd \
-autorun /zap/wrk/zap-plan.yaml
Script authentication explicitly rather than relying on ZAP's form-based auto-fill, which routinely breaks on CSRF tokens, multi-step logins, or JS-rendered forms. A minimal authentication script (JavaScript, ZAP's scripting engine):
// checkout-login.js — ZAP authentication script
function authenticate(helper, paramsValues, credentials) {
var loginUrl = "https://staging.example.internal/api/login";
var msg = helper.prepareMessage();
var requestBody = JSON.stringify({
username: credentials.getParam("username"),
password: credentials.getParam("password")
});
helper.sendAndReceive(msg, requestUri(loginUrl), requestBody);
return msg;
}
function getRequiredParamsNames() { return []; }
function getOptionalParamsNames() { return []; }
Verify authentication actually succeeded by checking the ZAP "Authentication" tab/log for a logged-in indicator (e.g. absence of a "login failed" string) before trusting scan coverage of authenticated pages.
Seed API scans from an OpenAPI spec instead of relying on the spider to discover routes with no HTML links:
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
Or as an Automation Framework job:
- type: openapi
parameters:
apiUrl: "https://staging.example.internal/openapi.json"
targetUrl: "https://staging.example.internal"
Tune alert thresholds with a rules file rather than disabling
whole scan categories — format is <rule-id> <TAB> <threshold> <TAB> <comment>:
# zap-rules.tsv
10202 IGNORE Anti-CSRF token check - bearer-token API, no cookies used
10096 WARN Timestamp disclosure - internal staging env only
40018 FAIL SQL Injection (time-based) - always block on this
Reference it in the baseline wrapper (-c zap-rules.tsv) or set
per-rule thresholds in the Automation Framework's alertFilter job
type for the declarative equivalent.
Gate the pipeline on risk + confidence, not raw alert count. ZAP
reports Risk (High/Medium/Low/Informational) and Confidence
separately in its JSON/SARIF output; the exitStatus job (step 2)
or a small post-processing script should fail only on
High-risk-and-Medium-or-higher-confidence findings, routing the rest
to a dashboard for manual review.
Separate cadence by scan type: baseline on every PR-preview deploy (cheap, safe), full active scan on a nightly/weekly schedule or pre-release gate against a dedicated DAST test environment (slower, intrusive) — see dast-integration for the CI-wiring pattern this applies within.
defaultStrength/defaultThreshold
explicit in the plan file rather than accepting ZAP's install
defaults, so scan behavior doesn't silently change across ZAP
version upgrades.Symptom: The active scan reports dozens of injection findings, but
they're all on the login page and nothing behind it — the app has
30+ authenticated routes the scan never touched.
Fix: The authentication script/context is misconfigured or
silently failing. Check the ZAP authentication log for a successful
login indicator, verify the loggedInIndicator/loggedOutIndicator
regex in the context matches real page content, and confirm session
management (cookie vs. bearer token) matches how the app actually
authenticates.
Symptom: An active scan run against the shared staging environment creates dozens of junk orders/accounts, or trips a third-party sandbox's rate limit and pages the on-call for that integration. Fix: Active scans send real exploit-style payloads that can mutate state — run them only against a dedicated, disposable DAST test environment with third-party integrations stubbed/sandboxed, never a shared staging environment (see dast-integration for environment-isolation guidance).
Symptom: The spider gets stuck and reports near-zero URLs found
on a single-page application (SPA) built with React/Vue/Angular.
Fix: ZAP's traditional spider follows <a href> links and
doesn't execute client-side JavaScript routing; switch to ZAP's
AJAX Spider (ajaxSpider job type, backed by a headless browser)
for JS-heavy frontends, or seed the crawl from an OpenAPI spec if the
real attack surface is the backing API rather than the rendered
pages.
Symptom: CSRF-protected login forms cause the automated form-fill to fail every time, and the scan never authenticates. Fix: Use a scripted authentication method (JavaScript authentication script, as in step 3) that explicitly extracts and replays the CSRF token, or injects a pre-generated session cookie/bearer token directly, instead of relying on ZAP's generic form-based auto-fill.
Symptom: Two runs of the same plan against the same target a week apart report a different set of findings, making regressions hard to track. Fix: Pin the ZAP image/version, keep the plan YAML and rules file in version control, and run against a environment with stable, seeded test data rather than a staging environment whose data/state constantly changes between runs.
A REST API service (checkout-service) adds a ZAP baseline job on every
PR-preview deploy, and a scheduled authenticated full scan against a
dedicated DAST test environment, both driven by the Automation
Framework.
.zap/baseline-plan.yaml:
env:
contexts:
- name: "checkout-api"
urls:
- "https://pr-preview.example.internal"
jobs:
- type: openapi
parameters:
apiUrl: "https://pr-preview.example.internal/openapi.json"
targetUrl: "https://pr-preview.example.internal"
- type: passiveScan-wait
parameters:
maxDuration: 5
- type: report
parameters:
template: "traditional-html"
reportDir: "/zap/wrk"
reportFile: "zap-baseline-report"
- type: exitStatus
parameters:
errorLevel: "High"
.github/workflows/dast-zap.yml:
name: dast-zap
on:
pull_request:
schedule:
- cron: '0 2 * * *'
jobs:
baseline:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ZAP baseline (Automation Framework)
run: |
docker run --rm -v "$(pwd)/.zap:/zap/wrk:rw" \
-t zaproxy/zap-stable:2.15.0 zap.sh -cmd \
-autorun /zap/wrk/baseline-plan.yaml
full-scan-nightly:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: ZAP authenticated full scan
env:
DAST_TEST_USER: ${{ secrets.DAST_TEST_USER }}
DAST_TEST_PASSWORD: ${{ secrets.DAST_TEST_PASSWORD }}
run: |
docker run --rm -v "$(pwd)/.zap:/zap/wrk:rw" \
-e DAST_TEST_USER -e DAST_TEST_PASSWORD \
-t zaproxy/zap-stable:2.15.0 zap.sh -cmd \
-autorun /zap/wrk/full-scan-plan.yaml
Sample baseline finding (HTML report, trimmed):
FAIL-NEW: SQL Injection - Time Based [40018]
Risk: High | Confidence: Medium
URL: https://pr-preview.example.internal/api/orders?status=
Evidence: response delayed ~5000ms for payload "1' AND SLEEP(5)-- -"
Remediation: trace the status query parameter through the /api/orders
handler to confirm it reaches a raw SQL string; fix with a parameterized
query, redeploy the PR preview, and re-run the baseline plan to confirm
the finding clears before merge.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
zap, dast, dynamic-scanning, security-testing, automation-framework, openapi
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin security-tooling-skills15 skills in this plugin
/certificate-lifecycle-management-at-scaleGuides managing TLS/mTLS certificate lifecycle across many services and environments beyond a single Kubernetes cluster — enterprise CA integration (ACME private CA, Microsoft AD CS, cloud-managed private CAs), cross-service rotation automation, expiry monitoring/alerting, and CA hierarchy/trust-chain management for a mixed fleet of VMs, on-prem servers, and multiple clusters. Use when the user asks to "automate cert rotation across our whole fleet," "integrate with our enterprise CA," "why do we keep having certificate expiry outages," "design a CA hierarchy for the org," "track every certificate's expiry date across environments," or "cert-manager only covers our Kubernetes clusters, what about everything else." Distinct from cert-manager's Kubernetes-native scope — see `../../../kubernetes-platform/skills/cert-manager-tls-automation/SKILL.md`.
/enterprise-sso-and-idp-federation-configurationGuides configuring enterprise workforce single sign-on — SAML 2.0 and OIDC federation between an identity provider (Okta, Azure AD/Entra ID, Keycloak) and downstream applications, including metadata exchange, attribute/claim mapping, group-to-role provisioning (SCIM), and multi-IdP federation trust. Use when the user asks to "set up SAML SSO with Okta," "configure Azure AD/Entra ID as our OIDC provider," "stand up Keycloak as an internal IdP," "map IdP groups to application roles," "debug a SAML assertion that won't validate," or "federate a second IdP for an acquired company's users." Distinct from cloud-iam-hardening (workload/service IAM in a cloud provider) — this skill is about federating *human workforce* identity into applications for SSO.
/falco-configuration-validationValidates Falco runtime detection rules for false-positive rate and actual firing correctness before trusting them in a channel that pages a human — running new/changed rules in log-only mode against real traffic, measuring alert volume and content, and confirming a rule fires on a deliberate positive-control trigger before promoting it to a higher-severity, paging-routed configuration. Use when the user asks to "validate this Falco rule before enabling it," "why is Falco so noisy," "test our Falco rules don't false-positive on real traffic," "review this rule set before it pages on-call," or "make sure Falco rules aren't about to be enabled in enforce/blocking mode without an audit period." Pairs with falco-runtime-threat-detection-configuration.
/falco-runtime-threat-detection-configurationGuides authoring and deploying Falco runtime threat detection rules — the eBPF/kernel-module-based syscall event stream, Falco's rule syntax (condition/output/priority), writing custom rules for a specific workload's known-good behavior, tuning noisy default rules, and wiring alerts to Falcosidekick outputs. Use when the user asks to "write a Falco rule to detect X," "why is Falco alerting on normal behavior," "detect a shell spawned inside a container at runtime," "set up Falco with eBPF instead of the kernel module," "send Falco alerts to Slack/PagerDuty," or "what's the difference between Falco and admission-control policy engines like OPA/Kyverno." Pairs with falco-configuration-validation for pre-enforcement false-positive testing.
/fortify-static-analysisGuides deep, tool-specific use of OpenText (formerly Micro Focus) Fortify Static Code Analyzer (SCA) and Fortify Audit Workbench for enterprise, on-premises static analysis — the translate/scan build workflow, Fortify Security Rulepacks, audit workbench triage (Not an Issue / Reliability / Suspicious), and how Fortify's on-prem, build-integrated model differs operationally from cloud-native SAST. Use when the user asks to "run a Fortify scan", "configure sourceanalyzer for a build", "triage findings in Fortify Audit Workbench", "integrate Fortify with Jenkins/Azure DevOps", "reduce Fortify SCA false positives", or "compare Fortify against SonarQube/Semgrep for enterprise compliance". Fortify-specific depth on the translate/scan model and enterprise workflow; for the general SAST concept see sast-integration in the devsecops domain.
/kubewarden-admission-policy-configurationGuides configuring Kubewarden as a WASM-based Kubernetes admission policy engine — installing the policy-server and controller, writing or reusing WebAssembly policies from the Kubewarden Policy Hub, ClusterAdmissionPolicy/AdmissionPolicy resources, monitor-mode rollout before enforce, and multi-language policy authoring (Rego, Rust, Go via the SDKs) as an alternative to OPA/Gatekeeper or Kyverno. Use when the user asks to "set up Kubewarden," "write a WASM admission policy," "why use Kubewarden instead of OPA/Kyverno," "reuse a policy from the Kubewarden Policy Hub," "run an admission policy in monitor mode before enforcing it," or "author a Kubernetes admission policy without writing Rego."
Other plugins' skills for the same job