zap-baseline
БесплатноБез исполняемых скриптовНе проверенUse when a web app needs OWASP ZAP scanning before production: the Docker baseline passive scan as a CI gate, the full active scan for staging, the Ajax…
от testland★ 18 звёзд на GitHubОб этом скилле
zap-baseline
Overview
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.
When to use
- The repo deploys a web app + needs pre-prod DAST gate.
- A CI workflow needs a non-intrusive scan that's safe to point at a deployed staging environment.
- The team uses OWASP ZAP (de facto OSS DAST) over commercial alternatives.
- The app's interesting routes sit behind a login wall (references/auth.md).
- The team is designing its DAST rollout cadence from scratch (references/cadence.md).
Step 1 - Install
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 |
Step 2 - First baseline scan
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.
Step 3 - Common flags
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 |
Step 4 - Authenticated scans
For apps requiring login, export a ZAP context file from the GUI (Sites → right-click → Export Context). The context file encodes:
- Auth method (form / script / HTTP / OAuth)
- Login URL + creds (referenced env vars; never hardcode)
- Session-management strategy
- Logged-in / logged-out indicators
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
Step 5 - Active scan companion (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.
Step 6 - False-positive triage (MANDATORY)
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.
Step 7 - Output formats for cross-tool triage
docker run -v $(pwd)
Установить zap-baseline в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл zap-baseline?
Use when a web app needs OWASP ZAP scanning before production: the Docker baseline passive scan as a CI gate, the full active scan for staging, the Ajax spider for SPAs, scans behind a login (forms, JSON, OAuth or bearer tokens) and a rollout plan from PR baseline to nightly active scans.
Как установить скилл zap-baseline?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл zap-baseline запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub