Job report failed to generate report AF

70 views
Skip to first unread message

Panagiotis Megremis

unread,
Nov 25, 2021, 12:31:10 PM11/25/21
to OWASP ZAP User Group
Hi Simon,

I'm Running AF inside docker on a Github Actions Pipeline.
Everything works as expected except the report job:

The following script is running:

Run docker run -v $(pwd):/zap/wrk:rw -v -t owasp/zap2docker-stable zap.sh -cmd -autorun wrk/zap-full-scan.yml

and the report job in YAML file looks like this:
- parameters: template: "traditional-json" reportDir: "/zap/wrk"
reportFile: "zap-report" reportTitle: "ZAP Scanning Report" reportDescription: "" name: "report" type: "report"

However, I'm getting the following error.


Job spiderAjax finished
281Job passiveScan-wait started
282Job passiveScan-wait finished
283Job activeScan started
284Job activeScan set default strength to LOW
285Job activeScan set default threshold to LOW
286Job activeScan finished
287Job report started
288Job report failed to generate report: /zap/wrk/zap-report.json
289Job report finished
290Automation plan failures:
291 Job report failed to generate report: /zap/wrk/zap-report.json
292Error: Process completed with exit code 1.

If I leave the reportDir empty it pass and save it to /home/zap dir which I guess is the default.

Is something wrong with the /zap/wrk dir?

Regards,

Panos

kingthorin+owaspzap

unread,
Nov 25, 2021, 2:31:07 PM11/25/21
to OWASP ZAP User Group
I don't think it should matter, but just as a debugging step could you try reportDir: "/zap/wrk/"  (with the trailing slash).

Panagiotis Megremis

unread,
Nov 26, 2021, 5:39:07 AM11/26/21
to zaprox...@googlegroups.com
Hiya,

I've tried the  reportDir: "/zap/wrk/" with no luck:

Job report set template = traditional-html
Job report set reportDir = /zap/wrk/
Job report set reportFile = zap-report
Job report set reportTitle = ZAP Scanning Report
Job report set reportDescription =
Job report set displayReport = false
Job spider started
Job spider found 648 URLs
Job spider finished
Job passiveScan-config started
Job passiveScan-config finished
Job report started
Job report failed to generate report: /zap/wrk/zap-report.html
Job report finished
Automation plan failures:
Job report failed to generate report: /zap/wrk/zap-report.html

Error: Process completed with exit code 1.

The funny thing is that when I'm running it locally (Macbook) it works
=====================================================
Job report set template = traditional-html
Job report set reportDir = /zap/wrk/
Job report set reportFile = zap-report
Job report set reportTitle = ZAP Scanning Report
Job report set reportDescription =
Job report set displayReport = false
Job spider started
Job spider found 511 URLs
Job spider finished
Job passiveScan-config started
Job passiveScan-config finished
Job report started
Job report generated report /zap/wrk/zap-report.html
Job report finished
Automation plan succeeded!

Could be the case that in the runner that i use in GH actions the user does not have rights to create /zap/wrk directory  ?



--
You received this message because you are subscribed to the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/deec0dd3-bead-4e78-b423-ef9df8359f4dn%40googlegroups.com.

This e-mail is subject to Camelot’s Legal Notice


Simon Bennetts

unread,
Nov 26, 2021, 6:52:19 AM11/26/21
to OWASP ZAP User Group
I think thats probably the problem.

At some point we'll add a github action just for the automation frmework, ie one that just takes a yaml file...

Cheers,

Simon

Panagiotis Megremis

unread,
Nov 30, 2021, 5:00:32 AM11/30/21
to zaprox...@googlegroups.com
Hi Simon,

I've managed to make it work by using  --user root.
The report is generated.

Thanks for your help.

You received this message because you are subscribed to a topic in the Google Groups "OWASP ZAP User Group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/zaproxy-users/yOEvA0coRQ4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to zaproxy-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/zaproxy-users/5e964821-1cd4-4e76-b4f7-e1ef7be308d8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages