Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload multiple ZAP Reports #102

Open
vincebrechbuehl opened this issue May 6, 2022 · 1 comment
Open

Upload multiple ZAP Reports #102

vincebrechbuehl opened this issue May 6, 2022 · 1 comment

Comments

@vincebrechbuehl
Copy link

In my Jenkins pipeline I have integrated a Zap scan that scans multiple targets, for each target a ZAP report is generated. I want to upload multiple ZAP reports in Sonar? I have analysed the Java source code of the ZapSensor class as well as XmlReportFile/HtmlReportFile and it is not possible like this.
So is it possible to extend the logic of the ZapSensor class to handle multiple ZAP reports, or is this not possible at all for architectural reasons?
I imagine extending the two parameters "sonar.zaproxy.htmlReportPath" and "sonar.zaproxy.rulesFilePath" so that you can specify multiple reports as a path and then extending the ZapSensor class so that it processes multiple reports. Could such a logic work?

@pablosguajardo
Copy link

pablosguajardo commented Jan 25, 2023

that would be great. if they do it saves us a lot of work.
what you can do is request the xml report and then call the api and request the html report and save it:

http://localhost:$(PortZapProxy)/JSON/reports/action/generate/?apikey=$(keyOwaspZapProxy)&title=Report+html&template=traditional-html&theme=&description=&contexts=&sites=&sections=&includedConfidences=&includedRisks=&reportFileName=zaproxy-htmlReport.html&reportFileNamePattern=&reportDir=$(Common.TestResultsDirectory)&display=

I do it in devops with powershell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants