How to Fix OWASP ZAP Alert Filters
In this tutorial, you'll learn about How to Fix OWASP ZAP Alert Filters. We cover key concepts, practical examples, and best practices.
Your ZAP report shows hundreds of false positive alerts, and you cannot suppress them. Alert filters let you ignore known false positives without re-scanning.
The Wrong Way
// Manually removing alerts from the report each time
// This wastes time and does not scale
Manual removal is error-prone — the same false positives reappear after every scan.
The Right Way
Step 1: Create an alert filter from a false positive
# ZAP → Alerts → right-click a false positive alert
# → "Add Alert Filter"
# This creates a filter based on the alert's attributes
Step 2: Configure the filter criteria
# Filter dialog:
# - Alert Type: X-Powered-By Header
# - New Risk: False Positive
# - URL: https://target.example.com/.* (regex)
# - Parameter: (empty — applies to all)
# - Attack: (empty — applies to all)
Step 3: Apply the filter
# Click "Apply" → the filter is stored
# Existing alerts matching the filter are updated immediately
# The alert now shows "False Positive" in the Alerts tab
Step 4: Manage filters globally
# ZAP → Tools → Options → Alert Filters
# Here you can:
# - View all filters
# - Export/import filters (JSON format)
# - Enable/disable individual filters
# - Delete obsolete filters
Alert filters applied: 15 "X-Powered-By" downgraded to False Positive, 8 "Missing CSP" ignored for /legacy/ paths.
Prevention
- Create alert filters during the first scan and reuse them across scans.
- Export alert filters as JSON and share them within your team.
- The filter-and-suppress pattern is used in Durga Antivirus Pro's detection rules — whitelisting known-safe patterns reduces alert fatigue.
Common Mistakes with zap alert filter
- Mixing let bindings with <- bindings in do notation, producing type errors
- Overlapping type class instances that cause GHC to reject the program with ambiguous dispatch errors
- Non-exhaustive pattern matches that compile with warnings then crash at runtime
These mistakes appear frequently in real-world OWASP code. DodaTech's contributors have identified these patterns through analysis of open-source projects and production systems.
Practice Exercise
Write a pure function that safely divides two integers using Maybe, then test it with edge cases like division by zero and negative numbers.
This exercise reinforces the concepts covered in this guide. Try implementing it before checking online solutions.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro