2

I have a list of 30 websites I have scanned. I need to pull out a report for each individual website. Is it possible to do? Right now I am just running a report and getting the results for all 30 and it just comes out in a huge chunk of data I dont have time to sift through.

  • I think you can also add a pdf reporter plugin, That might do this as well. – Soap Apr 24 '14 at 8:35
2

The ZAP reporting could definitely do with some improvements. However you can access all of the alerts via the ZAP API in JSON and XML format. If you enable the API (via the options) you can then access a URL like:

http://zap/JSON/core/view/alerts/?baseurl=http%3A%2F%2Fwww.example.com%2F&start=&count=

to get all of the alerts reported on www.example.com

FYI we do have a ZAP user group: http://groups.google.com/group/zaproxy-users which is also accessible via the ZAP 'online' menu. That probably a better forum for ZAP specific questions :)

1

As per the recent update of owsap-zap you can generate a alert report ,it can be generated as pdf

you could find under reports-->generate alert report

in order to design how report need to be designed you can configure it under options-->report

  • The menu items seem to have changed, but this at least pointed me in the right direction; thanks! – rinogo Nov 2 '18 at 14:54
0

You could also use this native Java client for the ZAP API: https://github.com/continuumsecurity/zap-java-api

Then you could do:

ZAProxyScanner zaproxy = new ZAProxyScanner(HOST, PORT, "");
getAlertsByHost(zaproxy.getAlerts());


private Map<String, List<Alert>> getAlertsByHost(List<Alert> alerts) {
    Map<String, List<Alert>> alertsByHost = new HashMap<String, List<Alert>>();
    for (Alert alert : alerts) {
        URL url = null;
        try {
            url = new URL(alert.getUrl());
            String host = url.getHost();
            if (alertsByHost.get(host) == null) {
                alertsByHost.put(host, new ArrayList<Alert>());
            }
            alertsByHost.get(host).add(alert);
        } catch (MalformedURLException e) {
            System.err.println("Skipping malformed URL: "+alert.getUrl());
            e.printStackTrace();
        }
    }
    return alertsByHost;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.