transferring alert filters between zap instances

176 views
Skip to first unread message

g

unread,
Jan 2, 2020, 9:34:51 PM1/2/20
to OWASP ZAP User Group
I am running scans with ZAP 2.8.0 on my local machine. I would like to create a set of alert filters locally and then transfer the alert filters to a zap instance running in the cloud.
I am trying to do this with global alert filters, but I am willing to use context level filters if that is easier.

How do you transfer global filters from one zap instance to another?

Additional info:
I started importing/exporting my contexts, but I always create a new session when I run a new scan.

I discovered today that filters are stored in zap's internal database. Is it possible to use a sql script to populate the alerts table with filters, or what is the best practice?

Thanks

Simon Bennetts

unread,
Jan 3, 2020, 4:18:56 AM1/3/20
to OWASP ZAP User Group
Global alert filters are actually stored in the standard ZAP config file.
This FAQ explains how you can work out what keys you need to use for any config element: https://github.com/zaproxy/zaproxy/wiki/FAQconfigValues
You can put the config values for all of the global alert filters in one file, copy them to the relevant instances and then start ZAP with those values via the '-configfile' parameter.

g

unread,
Jan 5, 2020, 10:14:30 PM1/5/20
to OWASP ZAP User Group
Thanks for getting back to me Simon.

I'm trying to load alert filters via a config file, but I don't see them in the UI under Tools/Options/Global Alert Filters.
Yet when I look at zap.log it looks like they are loading.
I've attached my config with the alert filters and an excerpt from zap.log

I'm using zap 2.8.0 on MacOS.

This is the command I'm using to start zap:
/Applications/OWASP\ ZAP.app/Contents/MacOS/OWASP\ ZAP.sh -configfile ~/zap_config
zap_config
zap_log_excerpt

g

unread,
Jan 5, 2020, 10:39:00 PM1/5/20
to OWASP ZAP User Group
Please disregard my previous post. I just realized I had typos in my config.

Alert filters are loading after the typos were fixed.

Simon Bennetts

unread,
Jan 6, 2020, 3:56:24 AM1/6/20
to OWASP ZAP User Group
No problem - thanks for letting us know :)
Reply all
Reply to author
Forward
0 new messages