Owasp zap

From G1Joshi/Agent-Skills · View interactive version

Owasp zap is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. Expert OWASP ZAP (Zed Attack Proxy) assistance covering automated vulnerability scanning, spidering, and DAST in CI/CD. Use when scanning web apps for OWASP Top 10 vulnerabilities, automating scans, or penetration testing.

How to use this skill

Skill file

OWASP ZAP (Zed Attack Proxy)

OWASP ZAP is the world's most widely used free web app scanner. It is perfect for developers and functional testers who are new to penetration testing, as well as automated CI/CD pipelines.

When to Use

Quick Start

# Run a quick scan against a URL
docker run -t owasp/zap2docker-stable zap-baseline.py -t https://www.example.com

Core Concepts

Active vs Passive Scanning

# Run ZAP Docker Baseline Scan (Passive Security Audit)
docker run -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable zap-baseline.py \
  -t https://staging.example.com -r zap_report.html

ZAP Automation Framework (YAML)

Declarative configuration for running complex automated security workflows in CI/CD:

# zap-automation.yaml
env:
  contexts:
    - name: "Staging App"
      urls: ["https://staging.example.com"]
jobs:
  - type: spider
    parameters:
      maxDuration: 5
  - type: activeScan
    parameters:
      maxScanDurationInMins: 15
  - type: report
    parameters:
      template: traditional-html
      reportDir: /zap/wrk/
      reportFile: zap-active-report.html

Automated API Scanning from OpenAPI Specification

Imports OpenAPI / Swagger endpoints and tests each parameter for injection vulnerabilities:

docker run -v $(pwd):/zap/wrk/:rw -t ghcr.io/zaproxy/zaproxy:stable zap-api-scan.py \
  -t https://staging.example.com/api/v1/swagger.json -f openapi -r api_security_report.html

Common Patterns

Baseline DAST Scan in GitHub Actions

Problem: Vulnerabilities like SQL injection or XSS are only detected after release to production.

Solution:

Run automated ZAP baseline container scans in CI/CD:

- name: Run OWASP ZAP Baseline Scan
  uses: zaproxy/action-baseline@v0.12.0
  with:
    target: "https://staging.example.com"
    rules_file_name: ".zap/rules.tsv"
    fail_action: true

Best Practices

Do:

Don't:

Troubleshooting

| Error | Cause | Solution |

| :---------------------- | :------------------- | :--------------------------------------------------------------- |

| Scan takes forever | Spider got stuck. | Exclude logout URLs or calendar/looping paths from the context. |

| Authentication Failed | ZAP couldn't log in. | Use the ZAP Desktop UI to record a Login Sequence (Zest Script). |

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.