/qa-security-scanning:zap-baselinefrom qa-security-scanning
Runs OWASP ZAP baseline passive scans as a CI gate, active scans for staging, Ajax spider for SPAs, and authenticated scans behind login walls. Includes a rollout plan from PR baseline to nightly active scans.
Ships in qa-security-scanning. 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.
Read when SKILL.md points to them.
Per zaproxy.org/docs/docker/baseline-scan/:
"The ZAP Baseline scan is a script that is available in the ZAP Docker images. It runs the ZAP spider against the specified target for (by default) 1 minute and then waits for the passive scanning to complete before reporting the results."
The baseline scan is passive only - non-intrusive, safe for
production. The companion zap-full-scan.py adds active scanning
(injection probes, XSS payloads) and is NOT safe for
production; reserve for staging.
ZAP baseline runs from the official Docker image - no host install needed. Per zap-base:
docker pull ghcr.io/zaproxy/zaproxy:stable
Image variants:
| Tag | Use |
|---|---|
:stable | Production-grade; pin in CI |
:weekly | Latest features; for evaluation |
:bare | Headless minimal; smallest |
Per zap-base (verbatim):
docker run -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py \
-t https://www.example.com -r testreport.html
The -v $(pwd):/zap/wrk/:rw mount makes the report writable to the
host directory. The report file lands at ./testreport.html after
the scan.
Per zap-base:
| Flag | Use |
|---|---|
-t URL | Target URL (required) |
-r FILE | HTML report output |
-w FILE | Markdown report |
-x FILE | XML report |
-J FILE | JSON report (for finding triage) |
-c FILE | Config file: rule INFO/IGNORE/FAIL behavior |
-P PORT | Specify ZAP listen port |
-j | Use Ajax spider in addition to traditional spider (JS-heavy apps) |
-m MINS | Spider duration in minutes (default 1) |
-d | Show debug messages |
-I | Don't return failure on warning (gate softly) |
-n CONTEXT_FILE | Authenticated scan context file |
For apps requiring login, export a ZAP context file from the GUI (Sites → right-click → Export Context). The context file encodes:
Building that context from scratch - choosing the auth method, wiring session management, calibrating verification indicators, CSRF and OAuth/bearer handling - is walked end to end in references/auth.md. Then:
docker run -v $(pwd):/zap/wrk/:rw \
-e ZAP_AUTH_USERNAME=$USER \
-e ZAP_AUTH_PASSWORD=$PASS \
-t ghcr.io/zaproxy/zaproxy:stable \
zap-baseline.py -t https://app.example.com -n /zap/wrk/context.xml -J report.json
zap-full-scan.py)For staging-only deeper analysis:
docker run -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable \
zap-full-scan.py -t https://staging.example.com -J report.json
zap-full-scan.py triggers active payloads (SQLi probes, XSS,
SSRF). NEVER point at production - risk of data corruption +
generates audit-log noise.
Per zap-base, rule customization via -c config_file
where each line is <rule_id>\t<INFO|WARN|IGNORE|FAIL>\t<URL_pattern>:
Example zap-config.tsv:
10049 IGNORE * # Cookie No HttpOnly: legacy session cookie; tracked in JIRA-1234
40012 WARN https://app.example.com/admin/* # XSS: legacy admin pages; not exposed to users
10063 FAIL * # Permissions Policy: must be set on all responses
Three suppression layers:
| Mechanism | Example | When to use |
|---|---|---|
| Per-rule config TSV | <rule_id>\tIGNORE\t* | Rule disabled globally |
| Per-URL pattern | <rule_id>\tWARN\thttps://app/admin/* | Rule downgraded for known-old code path |
| Context exclusion | <exclude_from_context> in context XML | Whole URL trees out of scope |
-I flag | zap-baseline.py -I ... | Soft gate: warns but exits 0 |
Justification template (mandatory in config):
# Rule 10049 (Cookie No HttpOnly)
# Suppressed: 2026-05-15 by [email protected]
# Reason: legacy session cookie; tracked in JIRA-1234; expires 2026-09-15
# Re-review-date: 2026-09-15
10049 IGNORE *
Cadence: every quarter, audit the config TSV - every IGNORE entry should have an Re-review-date. Past-due entries are removed + re-evaluated.
docker run -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable \
zap-baseline.py -t https://app.example.com -J zap-report.json
The JSON report feeds cross-tool aggregation. For SARIF output (GitHub Code Scanning), use a converter (zap-sarif container action).
GitHub Actions:
jobs:
zap-baseline:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: zaproxy/[email protected]
with:
target: 'https://staging.example.com'
rules_file_name: '.zap/rules.tsv'
cmd_options: '-J zap-report.json'
- uses: actions/upload-artifact@v4
if: always()
with: { name: zap-report, path: zap-report.json }
The official zaproxy/action-baseline action wraps the Docker
invocation. Auto-creates a GitHub Issue on failure.
Designing the full team cadence around this job - PR-blocking passive baseline, nightly ZAP full + nuclei active layer, the baseline-finding ratchet for legacy apps, dedup, and coverage measurement - is in references/cadence.md.
| Anti-pattern | Why it fails | Fix |
|---|---|---|
Run zap-full-scan.py against production | Active payloads pollute / damage data | Staging-only (Step 5) |
Skip -J JSON output | Can't feed finding triage; report is HTML-only | Always pass -J (Step 7) |
| Ignore Ajax spider for SPAs | Missing routes; coverage gap | Add -j flag (Step 3) |
| Hardcode credentials in context file | Secrets leak in repo | Reference env vars (Step 4) |
Suppress without # Re-review-date | Permanent debt | Required template (Step 6) |
-m (Step 3).nuclei-dast - sister DAST tool (template-driven scanning)evals/auditor-sampled-four-of-our-eighteen-silences/criteria.json (opens in a new tab)evals/auditor-sampled-four-of-our-eighteen-silences/task.md (opens in a new tab)evals/bot-has-posted-no-alerts-since-march/criteria.json (opens in a new tab)evals/bot-has-posted-no-alerts-since-march/task.md (opens in a new tab)evals/four-urls-scanned-and-the-slide-says-full-coverage/criteria.json (opens in a new tab)evals/four-urls-scanned-and-the-slide-says-full-coverage/task.md (opens in a new tab)evals/hotfix-verification-aimed-at-the-live-store/criteria.json (opens in a new tab)evals/hotfix-verification-aimed-at-the-live-store/task.md (opens in a new tab)evals/six-weeks-of-logged-in-scans-that-never-logged-in/criteria.json (opens in a new tab)evals/six-weeks-of-logged-in-scans-that-never-logged-in/task.md (opens in a new tab)references/auth.md (opens in a new tab)references/cadence.md (opens in a new tab)references/oauth-bearer-injection.md (opens in a new tab)references/script-based-auth.md (opens in a new tab)references/verification-strategy.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
dast, owasp-zap, security-scanning, ci-cd, authenticated-scanning
npx claudepluginhub testland/qa --plugin qa-security-scanning17 skills in this plugin
/codeql-queriesUse for any question or task about CodeQL or deep semantic static analysis (SAST) on a GitHub repo, including setting up code scanning and finding injection that flows through helper functions across files: codeql database create and analyze per language, query packs, SARIF upload to code scanning, and suppressions./cve-exploitability-triageUse when a dependency, image or SBOM scan returned more CVEs than the team can fix and someone must decide what to fix first. Ranks each CVE by EPSS exploit probability and CISA KEV status, applies VEX and reachability, and sorts findings into Fix-Now, This-Sprint, Backlog or Accept-Risk./dependabot-configUse for any question or task about Dependabot or .github/dependabot.yml, including grouping updates into one PR and taming too many update PRs: required keys, ecosystems, directories and schedules, plus ignore rules, grouped PRs, allow lists, labels, PR limits, target branches, versioning strategy and security-only updates./dependency-vulnerability-scanningUse when a repo needs dependency CVE scanning (SCA) in CI, a team is choosing between native audits (npm audit, pip-audit, cargo audit), OSV-Scanner and Snyk, or findings need triage. Scans lockfiles with thresholds, checks packages were seen, outputs SARIF and allows only expiring ignores./gitleaks-scanningUse when a team needs open-source secret scanning on commits and in CI, or is adopting it on a repo with existing leaks: gitleaks git, dir and stdin scans, custom rules and allowlists in .gitleaks.toml, pre-commit and GitHub Action setup, baselines, and TruffleHog live verification./language-native-sastUse when a repo needs security linting inside its own toolchain: Bandit for Python, gosec for Go, eslint-plugin-security and no-unsanitized for JavaScript/TypeScript, or PMD's Apex rules for Salesforce, with justified suppressions, baselines for legacy code, SARIF and CI gates.Other plugins' skills for the same job