Empty Reports while generating in Java class 2.17

15 views
Skip to first unread message

Nick Hergatt

unread,
Jan 12, 2026, 1:45:40 PM (6 days ago) Jan 12
to ZAP User Group
I have the following method that automates the process of generating our monthly security reports. This month however the reports generated as empty. the HTML, XML, and CSV were intact bu tthey were devoid of any information. I was able to manually generate reports from the ZAP UI but i'm concerned about what this could mean for our automation efforts. 

```
public void reports() throws ClientApiException, IOException, TransformerException {
checkScanStatus();
buildContext();
List<ZapAlert> falsePositives = getUnmarkedFalsePositives();
updateFalsePositives(falsePositives);
clientApi.reports.generate(contextName,
"traditional-html",
null,
null,
contextName,
null,
null,
null,
null,
contextName,
null,
TARGET_OUTPUT_DIR,
"true");

clientApi.reports.generate(contextName,
"traditional-xml",
null,
null,
contextName,
null,
null,
null,
null,
contextName,
null,
TARGET_OUTPUT_DIR,
"true");
xmlToCsv();

}
```

Nick Hergatt

unread,
Jan 12, 2026, 2:03:35 PM (6 days ago) Jan 12
to ZAP User Group
Forgot to mention in my original post. due to our project running on java 8 we are still using the zap-clientapi version 1.11.0

thc202

unread,
Jan 12, 2026, 2:14:45 PM (6 days ago) Jan 12
to zaprox...@googlegroups.com
Hi,

If you are able to generate from the GUI you should too from the API. Is
the report configuration in the API the same as in the GUI?

Have you checked the ZAP log when generating from the API?

Best regards.

Nick Hergatt

unread,
Jan 12, 2026, 2:57:00 PM (6 days ago) Jan 12
to ZAP User Group
I don't see anything in the logs that indicate anything going wrong while it runs automatically or right when I run it manually. both the automated reports and the manual reports i'm running with everything set to default. 
Reply all
Reply to author
Forward
0 new messages