zap-sonar-plugin icon indicating copy to clipboard operation
zap-sonar-plugin copied to clipboard

No HTML-Report found. Please check property sonar.zaproxy.htmlReportPath

Open putthiwat0cha opened this issue 2 years ago • 3 comments

I add this line sonar.zaproxy.htmlReportPath=D:/SonarQube_9.6/zap/zaproxy-htmlReport.html into SonarQube/conf/sonar.properties and also generate a report file from OWASP ZAP into the same directory path.

However, when I launch SonarQube and click at ZAP extension dropbox, this No HTML-Report found. Please check property sonar.zaproxy.htmlReportPath message occurs.

Is this a bug? How can I solve this issue to be able to generate ZAP report from SonarQube?

Please help.

putthiwat0cha avatar Aug 31 '22 06:08 putthiwat0cha

you must have something wrong? have to follow the example:

sonar.zaproxy.reportPath=${WORKSPACE}/zaproxy-report.xml sonar.zaproxy.htmlReportPath=${WORKSPACE}/zaproxy-htmlReport.html

If you run it from a pipeline I don't think this is a correct path: D:/SonarQube_9.6/zap/zaproxy-htmlReport.html

pablosguajardo avatar Jan 25 '23 20:01 pablosguajardo

I have tried it and it is true, it gives error:

##[error]java.lang.UnsupportedOperationException: Can not add the same measure twice on [key=WebPruebaCore]: DefaultMeasure[component=[key=WebPruebaCore],metric=Metric[uuid=<null>,key=html_report,description=Report HTML,type=DATA,direction=0,domain=OWASP-ZAP,name=ZAP Report,qualitative=false,userManaged=false,enabled=true,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=true,decimalScale=<null>],value=<!DOCTYPE html>
java.lang.UnsupportedOperationException: Can not add the same measure twice on [key=WebPruebaCore]: DefaultMeasure[component=[key=WebPruebaCore],metric=Metric[uuid=<null>,key=html_report,description=Report HTML,type=DATA,direction=0,domain=OWASP-ZAP,name=ZAP Report,qualitative=false,userManaged=false,enabled=true,worstValue=<null>,bestValue=<null>,optimizedBestValue=false,hidden=false,deleteHistoricalData=true,decimalScale=<null>],value=<!DOCTYPE html>
##[error]<html>

pablosguajardo avatar Jan 26 '23 11:01 pablosguajardo

Does this have anything to do with the sonar version, I am using sonar 9.8

luozhijunroy18 avatar Jan 28 '23 02:01 luozhijunroy18