Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Dynamic application security testing (DAST) using OWASP ZAP (Zed Attack Proxy) with passive and active scanning, API testing, and OWASP Top 10 vulnerability detection. Use when: (1) Performing runtime security testing of web applications and APIs, (2) Detecting vulnerabilities like XSS, SQL injection, and authentication flaws in deployed applications, (3) Automating security scans in CI/CD pipelines with Docker containers, (4) Conducting authenticated testing with session management, (5) Generat
.claude/skills/aiskillstore-dast-zap/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 237% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 99% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 204% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 203% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 196% | 0% |
OWASP ZAP (Zed Attack Proxy) is an open-source DAST tool that acts as a manipulator-in-the-middle proxy to intercept, inspect, and test web application traffic for security vulnerabilities. ZAP provides automated passive and active scanning, API testing capabilities, and seamless CI/CD integration for runtime security testing.
Run a quick passive security scan:
bashdocker run -t zaproxy/zap-stable zap-baseline.py -t https://target-app.com -r baseline-report.html
Perform comprehensive active vulnerability testing:
bashdocker run -t zaproxy/zap-stable zap-full-scan.py -t https://target-app.com -r full-scan-report.html
Test APIs using OpenAPI/Swagger specification:
bashdocker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap-api-scan.py \ -t https://api.target.com \ -f openapi \ -d /zap/wrk/openapi-spec.yaml \ -r /zap/wrk/api-report.html
Identify the target application URL and define scope:
bash# Set target URL TARGET_URL="https://target-app.com" # For authenticated scans, prepare authentication context # See references/authentication_guide.md for detailed setup
Scope Considerations:
Execute passive scanning to analyze traffic without active attacks:
bash# Baseline scan performs spidering + passive scanning docker run -t zaproxy/zap-stable zap-baseline.py \ -t $TARGET_URL \ -r baseline-report.html \ -J baseline-report.json
What Passive Scanning Detects:
Perform active vulnerability testing (requires authorization):
bash# Full scan includes spidering + passive + active scanning docker run -t zaproxy/zap-stable zap-full-scan.py \ -t $TARGET_URL \ -r full-scan-report.html \ -J full-scan-report.json \ -z "-config api.addrs.addr.name=.* -config api.addrs.addr.regex=true"
Active Scanning Coverage:
WARNING: Active scanning performs real attacks. Only run against applications you have explicit authorization to test.
Scan REST, GraphQL, and SOAP APIs:
bash# OpenAPI/Swagger API scan docker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap-api-scan.py \ -t https://api.target.com \ -f openapi \ -d /zap/wrk/openapi.yaml \ -r /zap/wrk/api-report.html # GraphQL API scan docker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap-api-scan.py \ -t https://api.target.com/graphql \ -f graphql \ -d /zap/wrk/schema.graphql \ -r /zap/wrk/graphql-report.html
Consult references/api_testing_guide.md for advanced API testing patterns including authentication and rate limiting.
For testing authenticated application areas:
bash# Use bundled script for authentication setup python3 scripts/zap_auth_scanner.py \ --target $TARGET_URL \ --auth-type form \ --login-url https://target-app.com/login \ --username testuser \ --password-env ZAP_AUTH_PASSWORD \ --output auth-scan-report.html
Authentication methods supported:
See references/authentication_guide.md for detailed authentication configuration.
Review findings by risk level:
bash# Generate multiple report formats docker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap-full-scan.py \ -t $TARGET_URL \ -r /zap/wrk/report.html \ -J /zap/wrk/report.json \ -x /zap/wrk/report.xml
Risk Levels:
Map findings to OWASP Top 10 using references/owasp_mapping.md.
Add ZAP scanning to GitHub workflows:
yaml# .github/workflows/zap-scan.yml name: ZAP Security Scan on: [push, pull_request] jobs: zap_scan: runs-on: ubuntu-latest name: OWASP ZAP Baseline Scan steps: - name: Checkout uses: actions/checkout@v2 - name: ZAP Baseline Scan uses: zaproxy/action-baseline@v0.7.0 with: target: 'https://staging.target-app.com' rules_file_name: '.zap/rules.tsv' cmd_options: '-a'
Use YAML-based automation for advanced workflows:
bash# Create automation config (see assets/zap_automation.yaml) docker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable \ zap.sh -cmd -autorun /zap/wrk/zap_automation.yaml
The bundled assets/zap_automation.yaml template includes:
See scripts/ci_integration.sh for complete CI/CD integration examples.
scripts/)zap_baseline_scan.sh - Automated baseline scanning with configurable targets and reportingzap_full_scan.sh - Comprehensive active scanning with exclusion ruleszap_api_scan.py - API testing with OpenAPI/GraphQL specification supportzap_auth_scanner.py - Authenticated scanning with multiple authentication methodsci_integration.sh - CI/CD integration examples for Jenkins, GitLab CI, GitHub Actionsreferences/)authentication_guide.md - Complete authentication configuration for form-based, OAuth, and token authenticationowasp_mapping.md - Mapping of ZAP alerts to OWASP Top 10 2021 and CWE classificationsapi_testing_guide.md - Advanced API testing patterns for REST, GraphQL, SOAP, and WebSocketscan_policies.md - Custom scan policy configuration for different application typesfalse_positive_handling.md - Common false positives and verification techniquesassets/)zap_automation.yaml - Automation framework configuration templatezap_context.xml - Context configuration with authentication and session managementscan_policy_modern_web.policy - Scan policy optimized for modern JavaScript applicationsscan_policy_api.policy - Scan policy for REST and GraphQL APIsgithub_action.yml - GitHub Actions workflow templategitlab_ci.yml - GitLab CI pipeline templateStart with fast scans and progressively increase depth:
bash# Stage 1: Quick baseline scan (5-10 minutes) docker run -t zaproxy/zap-stable zap-baseline.py -t $TARGET_URL -r baseline.html # Stage 2: Full spider + passive scan (15-30 minutes) docker run -t zaproxy/zap-stable zap-baseline.py -t $TARGET_URL -r baseline.html -c baseline-rules.tsv # Stage 3: Targeted active scan on critical endpoints (1-2 hours) docker run -t zaproxy/zap-stable zap-full-scan.py -t $TARGET_URL -r full.html -c full-rules.tsv
Prioritize API security testing:
bash# 1. Test API endpoints with specification docker run -v $(pwd):/zap/wrk/:rw -t zaproxy/zap-stable zap-api-scan.py \ -t https://api.target.com -f openapi -d /zap/wrk/openapi.yaml -r /zap/wrk/api.html # 2. Run active scan on discovered API endpoints # (ZAP automatically includes spidered API routes) # 3. Test authentication flows python3 scripts/zap_auth_scanner.py --target https://api.target.com --auth-type bearer --token-env API_TOKEN
Test complete application including protected areas:
bash# 1. Configure authentication context # See assets/zap_context.xml for template # 2. Run authenticated scan python3 scripts/zap_auth_scanner.py \ --target https://app.target.com \ --auth-type form \ --login-url https://app.target.com/login \ --username testuser \ --password-env APP_PASSWORD \ --verification-url https://app.target.com/dashboard \ --output authenticated-scan.html # 3. Review session-specific vulnerabilities (CSRF, privilege escalation)
Implement ZAP as a security gate in deployment pipelines:
bash# Run baseline scan and fail build on high-risk findings docker run -t zaproxy/zap-stable zap-baseline.py \ -t https://staging.target.com \ -r baseline-report.html \ -J baseline-report.json \ --hook=scripts/ci_integration.sh # Check exit code if [ $? -ne 0 ]; then echo "Security scan failed! High-risk vulnerabilities detected." exit 1 fi
Solution: For scanning applications running on localhost or in other containers:
bash# Scanning host application from Docker container # Use docker0 bridge IP instead of localhost HOST_IP=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+') docker run -t zaproxy/zap-stable zap-baseline.py -t http://$HOST_IP:8080 # Scanning between containers - create shared network docker network create zap-network docker run --network zap-network -t zaproxy/zap-stable zap-baseline.py -t http://app-container:8080
Solution: Increase spider depth and scan duration:
bash# Configure spider to crawl deeper docker run -t zaproxy/zap-stable zap-baseline.py \ -t $TARGET_URL \ -r report.html \ -z "-config spider.maxDepth=10 -config spider.maxDuration=60"
For JavaScript-heavy applications, use AJAX spider or Automation Framework.
Solution: Create custom scan policy and rules file:
bash# Use bundled false positive handling guide # See references/false_positive_handling.md # Generate rules file to suppress false positives # Format: alert_id URL_pattern parameter CWE_id WARN|IGNORE|FAIL echo "10202 https://target.com/static/.* .* 798 IGNORE" >> .zap/rules.tsv docker run -t zaproxy/zap-stable zap-baseline.py -t $TARGET_URL -c .zap/rules.tsv
Solution: Configure session re-authentication:
bash# Use bundled authentication script with session monitoring python3 scripts/zap_auth_scanner.py \ --target $TARGET_URL \ --auth-type form \ --login-url https://target.com/login \ --username testuser \ --password-env PASSWORD \ --re-authenticate-on 401,403 \ --verification-interval 300
Solution: Reduce scan aggressiveness:
bash# Slower scan with delays between requests docker run -t zaproxy/zap-stable zap-baseline.py \ -t $TARGET_URL \ -r report.html \ -z "-config scanner.threadPerHost=1 -config scanner.delayInMs=1000"
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | fail→fail | 7,705 | 13,516 | +75% | 1 | 1 | 0% | 761 | 4,928 | +548% | 0 | 0 | — |
case-01 | fail→pass | 7,662 | 11,207 | +46% | 1 | 1 | 0% | 1,430 | 4,812 | +237% | 0 | 0 | — |
case-02 | fail→fail | 31,334 | 5,453 | -83% | 1 | 1 | 0% | 6,205 | 4,878 | -21% | 0 | 0 | — |
case-03 | pass→pass | 8,913 | 10,240 | +15% | 1 | 1 | 0% | 1,707 | 5,836 | +242% | 0 | 0 | — |
case-04 | pass→pass | 14,182 | 13,852 | -2% | 1 | 1 | 0% | 2,539 | 6,217 | +145% | 0 | 0 | — |
case-05 | pass→pass | 5,997 | 7,708 | +29% | 1 | 1 | 0% | 1,008 | 5,030 | +399% | 0 | 0 | — |
case-06 | fail→pass | 12,279 | 5,911 | -52% | 1 | 1 | 0% | 2,477 | 4,928 | +99% | 0 | 0 | — |
case-08 | fail→pass | 15,299 | 3,633 | -76% | 1 | 1 | 0% | 1,464 | 4,453 | +204% | 0 | 0 | — |
case-09 | fail→pass | 7,164 | 4,015 | -44% | 1 | 1 | 0% | 1,480 | 4,489 | +203% | 0 | 0 | — |
case-10 | pass→pass | 4,119 | 2,244 | -46% | 1 | 1 | 0% | 768 | 4,147 | +440% | 0 | 0 | — |
case-11 | fail→fail | 5,455 | 5,087 | -7% | 1 | 1 | 0% | 974 | 4,694 | +382% | 0 | 0 | — |
case-12 | pass→pass | 8,155 | 6,027 | -26% | 1 | 1 | 0% | 1,639 | 5,019 | +206% | 0 | 0 | — |
case-13 | pass→pass | 8,737 | 6,527 | -25% | 1 | 1 | 0% | 1,765 | 4,986 | +182% | 0 | 0 | — |
case-14 | fail→fail | 14,872 | 14,261 | -4% | 1 | 1 | 0% | 1,837 | 4,891 | +166% | 0 | 0 | — |
case-15 | fail→pass | 21,283 | 8,751 | -59% | 1 | 1 | 0% | 1,613 | 4,779 | +196% | 0 | 0 | — |
case-16 | pass→pass | 5,450 | 4,829 | -11% | 1 | 1 | 0% | 1,148 | 4,721 | +311% | 0 | 0 | — |
case-17 | pass→fail | 5,071 | 4,787 | -6% | 1 | 1 | 0% | 781 | 4,405 | +464% | 0 | 0 | — |
case-18 | fail→fail | 8,936 | 4,881 | -45% | 1 | 1 | 0% | 1,549 | 4,602 | +197% | 0 | 0 | — |
case-19 | fail→pass | 14,601 | 12,732 | -13% | 1 | 1 | 0% | 2,076 | 4,480 | +116% | 0 | 0 | — |
case-20 | fail→fail | 11,050 | 14,221 | +29% | 1 | 1 | 0% | 1,273 | 4,733 | +272% | 0 | 0 | — |
case-21 | fail→pass | 5,725 | 6,080 | +6% | 1 | 1 | 0% | 967 | 4,433 | +358% | 0 | 0 | — |
case-22 | pass→pass | 3,687 | 4,511 | +22% | 1 | 1 | 0% | 646 | 4,483 | +594% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.