OtherDevOpsGene / zap-sonar-plugin

Integrates OWASP Zed Attack Proxy reports into SonarQube
GNU General Public License v3.0
69 stars 31 forks source link

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

Open putthiwat0cha opened 2 years ago

putthiwat0cha commented 2 years ago

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.

pablosguajardo commented 1 year ago

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 commented 1 year ago

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>
luozhijunroy18 commented 1 year ago

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