integrating-dast-with-owasp-zap-in-pipeline

mukul975/Anthropic-Cybersecurity-Skills · updated May 25, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills install mukul975/Anthropic-Cybersecurity-Skills/integrating-dast-with-owasp-zap-in-pipeline
0 commentsdiscussion
summary

This skill covers integrating OWASP ZAP (Zed Attack Proxy) for Dynamic Application Security Testing in CI/CD pipelines. It addresses configuring baseline, full, and API scans against running applications, interpreting ZAP findings, tuning scan policies, and establishing DAST quality gates in GitHub Actions and GitLab CI.

skill.md
name
integrating-dast-with-owasp-zap-in-pipeline
description
'This skill covers integrating OWASP ZAP (Zed Attack Proxy) for Dynamic Application Security Testing in CI/CD pipelines. It addresses configuring baseline, full, and API scans against running applications, interpreting ZAP findings, tuning scan policies, and establishing DAST quality gates in GitHub Actions and GitLab CI. '
domain
cybersecurity
subdomain
devsecops
tags
- devsecops - cicd - dast - owasp-zap - dynamic-testing - secure-sdlc
version
1.0.0
author
mahipal
license
Apache-2.0
nist_csf
- PR.PS-01 - GV.SC-07 - ID.IM-04 - PR.PS-04

Integrating DAST with OWASP ZAP in Pipeline

When to Use

  • When testing running web applications for vulnerabilities like XSS, SQLi, CSRF, and misconfigurations
  • When SAST alone is insufficient and runtime behavior testing is required
  • When compliance mandates dynamic security testing of web applications before production
  • When testing APIs (REST/GraphQL) for authentication, authorization, and injection flaws
  • When establishing continuous DAST scanning in staging environments before production deployment

Do not use for scanning source code (use SAST), for scanning dependencies (use SCA), or for infrastructure configuration scanning (use IaC scanning tools).

Prerequisites

  • OWASP ZAP Docker image or installed locally (zaproxy/zap-stable or zaproxy/action-*)
  • Running target application accessible from the CI/CD runner (staging URL or Docker service)
  • ZAP scan rules configuration (optional, for tuning)
  • OpenAPI/Swagger specification for API scanning (optional)

Workflow

Step 1: Configure ZAP Baseline Scan in GitHub Actions

# .github/workflows/dast-scan.yml
name: DAST Security Scan

on:
  deployment_status:
  workflow_dispatch:
    inputs:
      target_url:
        description: 'Target URL to scan'
        required: true

jobs:
  zap-baseline:
    name: ZAP Baseline Scan
    runs-on: ubuntu-latest
    services:
      webapp:
        image: ${{ github.repository }}:${{ github.sha }}
        ports:
          - 8080:8080
        options: --health-cmd="curl -f http://localhost:8080/health" --health-interval=10s --health-timeout=5s --health-retries=5

    steps:
      - uses: actions/checkout@v4

      - name: ZAP Baseline Scan
        uses: zaproxy/[email protected]
        with:
          target: 'http://webapp:8080'
          rules_file_name: '.zap/rules.tsv'
          cmd_options: '-a -j'
          allow_issue_writing: false

      - name: Upload ZAP Report
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: zap-baseline-report
          path: report_html.html

Step 2: Configure ZAP Full Scan for Comprehensive Testing

  zap-full-scan:
    name: ZAP Full Scan
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: ZAP Full Scan
        uses: zaproxy/[email protected]
        with:
          target: ${{ github.event.inputs.target_url || 'https://staging.example.com' }}
          rules_file_name: '.zap/rules.tsv'
          cmd_options: '-a -j -T 60'

      - name: Upload Reports
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: zap-full-report
          path: |
            report_html.html
            report_json.json

Step 3: Configure API Scan with OpenAPI Specification

  zap-api-scan:
    name: ZAP API Scan
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: ZAP API Scan
        uses: zaproxy/[email protected]
        with:
          target: 'https://staging.example.com/api/openapi.json'
          format: openapi
          rules_file_name: '.zap/api-rules.tsv'
          cmd_options: '-a -j'

Step 4: Configure ZAP Scan Rules

# .zap/rules.tsv
# Rule ID	Action (IGNORE/WARN/FAIL)	Description
10003	IGNORE	# Vulnerable JS Library (handled by SCA)
10015	WARN	# Incomplete or No Cache-control Header
10021	FAIL	# X-Content-Type-Options Missing
10035	FAIL	# Strict-Transport-Security Missing
10038	FAIL	# Content Security Policy Missing
10098	IGNORE	# Cross-Domain Misconfiguration (CDN)
40012	FAIL	# Cross Site Scripting (Reflected)
40014	FAIL	# Cross Site Scripting (Persistent)
40018	FAIL	# SQL Injection
40019	FAIL	# SQL Injection (MySQL)
40032	FAIL	# .htaccess Information Leak
90033	FAIL	# Loosely Scoped Cookie

Step 5: Run ZAP with Docker Compose for Local Testing

# docker-compose.zap.yml
version: '3.8'
services:
  webapp:
    build: .
    ports:
      - "8080:8080"
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 10s
      retries: 5

  zap:
    image: zaproxy/zap-stable:latest
    depends_on:
      webapp:
        condition: service_healthy
    command: >
      zap-baseline.py
        -t http://webapp:8080
        -r /zap/wrk/report.html
        -J /zap/wrk/report.json
        -c /zap/wrk/rules.tsv
        -I
    volumes:
      - ./zap-reports:/zap/wrk
      - ./.zap/rules.tsv:/zap/wrk/rules.tsv

Key Concepts

TermDefinition
DASTDynamic Application Security Testing — tests running applications by sending requests and analyzing responses
Baseline ScanQuick passive scan that spiders the application without active attacks, suitable for CI/CD
Full ScanActive scan including attack payloads for XSS, SQLi, and other injection vulnerabilities
API ScanTargeted scan using OpenAPI/Swagger specs to test all documented API endpoints
SpiderZAP's crawler that discovers application pages and endpoints by following links
Active ScanPhase where ZAP sends attack payloads to discovered endpoints to find exploitable vulnerabilities
Passive ScanAnalysis of HTTP responses for security headers, cookies, and information disclosure without sending attacks
Scan PolicyConfiguration defining which attack types to enable and their intensity levels

Tools & Systems

  • OWASP ZAP: Open-source web application security scanner for DAST testing
  • zaproxy/action-baseline: GitHub Action for ZAP passive baseline scanning
  • zaproxy/action-full-scan: GitHub Action for ZAP active full scanning
  • zaproxy/action-api-scan: GitHub Action for API-focused scanning with OpenAPI support
  • Nuclei: Alternative vulnerability scanner with template-based detection for CI/CD integration

Common Scenarios

Scenario: Integrating DAST into a Staging Deployment Pipeline

Context: A team deploys to staging before production and needs automated DAST scanning between stages to catch runtime vulnerabilities.

Approach:

  1. Add a DAST job in the pipeline that triggers after successful staging deployment
  2. Run ZAP baseline scan first for quick passive feedback (2-5 minutes)
  3. Follow with a targeted API scan using the application's OpenAPI specification
  4. Configure rules.tsv to FAIL on critical findings (XSS, SQLi) and WARN on headers/cookies
  5. Upload ZAP reports as pipeline artifacts for review
  6. Block production deployment if any FAIL-level findings are detected
  7. Schedule weekly full scans against staging for deeper coverage

Pitfalls: ZAP full scans can take 30+ minutes and may overwhelm staging servers with attack traffic. Use baseline scans in CI and full scans on schedule. Running DAST against production without coordination can trigger WAF blocks and incident alerts.

Output Format

ZAP DAST Scan Report
======================
Target: https://staging.example.com
Scan Type: Baseline + API
Date: 2026-02-23
Duration: 4m 32s

FINDINGS:
  FAIL: 3
  WARN: 7
  INFO: 12
  PASS: 45

FAILING ALERTS:
  [HIGH] 40012 - Cross Site Scripting (Reflected)
    URL: https://staging.example.com/search?q=<script>
    Method: GET
    Evidence: <script>alert(1)</script>

  [MEDIUM] 10021 - X-Content-Type-Options Missing
    URL: https://staging.example.com/api/v1/*
    Evidence: Response header missing

  [MEDIUM] 10035 - Strict-Transport-Security Missing
    URL: https://staging.example.com/
    Evidence: HSTS header not present

QUALITY GATE: FAILED (1 HIGH, 2 MEDIUM findings)
how to use integrating-dast-with-owasp-zap-in-pipeline

How to use integrating-dast-with-owasp-zap-in-pipeline on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add integrating-dast-with-owasp-zap-in-pipeline
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills install mukul975/Anthropic-Cybersecurity-Skills/integrating-dast-with-owasp-zap-in-pipeline

The skills CLI fetches integrating-dast-with-owasp-zap-in-pipeline from GitHub repository mukul975/Anthropic-Cybersecurity-Skills and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/integrating-dast-with-owasp-zap-in-pipeline

Reload or restart Cursor to activate integrating-dast-with-owasp-zap-in-pipeline. Access the skill through slash commands (e.g., /integrating-dast-with-owasp-zap-in-pipeline) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.567 reviews
  • Anika Anderson· Dec 28, 2024

    integrating-dast-with-owasp-zap-in-pipeline has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Ren Farah· Dec 20, 2024

    integrating-dast-with-owasp-zap-in-pipeline fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Ren Bhatia· Dec 20, 2024

    We added integrating-dast-with-owasp-zap-in-pipeline from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Shikha Mishra· Dec 16, 2024

    integrating-dast-with-owasp-zap-in-pipeline has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Li Torres· Dec 16, 2024

    integrating-dast-with-owasp-zap-in-pipeline is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Anaya Anderson· Nov 19, 2024

    integrating-dast-with-owasp-zap-in-pipeline reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Ren Srinivasan· Nov 11, 2024

    We added integrating-dast-with-owasp-zap-in-pipeline from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Ren Gonzalez· Nov 11, 2024

    integrating-dast-with-owasp-zap-in-pipeline fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Rahul Santra· Nov 7, 2024

    integrating-dast-with-owasp-zap-in-pipeline reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Evelyn Reddy· Nov 7, 2024

    Keeps context tight: integrating-dast-with-owasp-zap-in-pipeline is the kind of skill you can hand to a new teammate without a long onboarding doc.

showing 1-10 of 67

1 / 7