OWASP ZAP
A free, open-source security scanner that tests a running web application or API the way an attacker would, from the outside.
- Type
- Dynamic application security testing (DAST)
- Created by
- An OWASP project, now ZAP by Checkmarx, still open source (Apache 2.0)
- Tests
- The running app, through its pages and its API
- In my stack
- Every deployment, in the CI/CD pipeline
What it is
ZAP, the Zed Attack Proxy, started as a project of OWASP, the foundation behind the OWASP Top 10 list of web application risks. Since 2024 its core team has worked at Checkmarx, and it remains free and open source. Unlike tools that read source code, ZAP doesn’t need to see the code at all: it crawls the running application or reads its API definition, then sends real attack payloads to every parameter and watches the responses.
A passive scan only observes traffic and flags issues like missing security headers or insecure cookies. An active scan goes further and tries SQL injection, cross-site scripting, command injection, path traversal and more. ZAP runs as a desktop app for manual testing, or without a screen in a container for automation.
Why I use it
It tests what attackers actually see. The real app, deployed with its real configuration, not just the code in isolation.
Simple attacks fail before release. Run on every deployment, it finds an injection or a missing header introduced today, today. I wrote about the injection attacks it catches.
It covers our own code. Dependency scanners check third-party components; ZAP checks how the application we wrote behaves under attack.
Free and automatable. It runs in a container in any CI/CD pipeline, with rules that decide which findings stop a release.
Where I use it
OWASP ZAP runs on every deployment of the HR management system. The CI/CD pipeline scans the running application and its Go API, so a vulnerability introduced by a change is found with that same change, not months later.
Best use cases
- Web apps and APIs scanned automatically on every deployment.
- Checking security headers, cookies and TLS settings across a whole site.
- Manual testing: intercepting and replaying requests to probe a feature in depth.
- A first security pass before a professional penetration test, so that expensive time goes to the hard problems.
When I’d use something else
ZAP doesn’t understand business rules, so it won’t notice that one user can open another user’s report: that takes access-control tests and a review. It doesn’t replace a penetration test by a specialist for high-risk systems either. And active scans send real attacks, so they must only target environments you own and are allowed to test, never someone else’s site.
A small example
An active scan of an API described by its OpenAPI file, run in a container against a staging environment. A rules file decides which findings fail the scan.
docker run --rm -v "$(pwd)":/zap/wrk:rw ghcr.io/zaproxy/zaproxy:stable \
zap-api-scan.py \
-t https://staging.example.com/openapi.json \
-f openapi \
-c zap-rules.conf \
-r zap-report.html
# Exit code 1 means a rule set to FAIL was triggered:
# the pipeline stops before production.