Error in report generation error

225 views
Skip to first unread message

Rakesh Kirola

unread,
Dec 18, 2022, 2:49:55 AM12/18/22
to zaprox...@googlegroups.com
Hi there,

I am getting an error as shown in the attached screenshot while generating a report from ZAP.

Below error can be seen in zap logs:

2022-12-18 13:16:48,270 [AWT-EventQueue-0] ERROR ReportDialog - Failed to generate a report using template org.zaproxy.addon.reports.Template@3d5147fd
org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "#alerts=alerts, #helper=helper, reportData.sites.{? #site=#this, !#alerts.{^ #userObject=#this.userObject, #msgUri=#userObject.msgUri, #helper.getHostForSite(#site) == #msgUri.host && #helper.getPortForSite(#site) == #userObject.message.requestHeader.hostPort && #helper.isSslSite(#site) == #msgUri.scheme.equals('https')}.isEmpty()}" (template: "/Users/rakeshkirola/Library/Application Support/ZAP/reports/risk-confidence-html/report.html" - line 32, col 3)
at org.thymeleaf.standard.expression.OGNLVariableExpressionEvaluator.evaluate(OGNLVariableExpressionEvaluator.java:191) ~[?:?]
at org.thymeleaf.standard.expression.OGNLVariableExpressionEvaluator.evaluate(OGNLVariableExpressionEvaluator.java:95) ~[?:?]
at org.thymeleaf.standard.expression.VariableExpression.executeVariableExpression(VariableExpression.java:166) ~[?:?]
at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:66) ~[?:?]
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:109) ~[?:?]
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:138) ~[?:?]
at org.thymeleaf.standard.expression.Expression.execute(Expression.java:125) ~[?:?]
at org.thymeleaf.standard.processor.StandardWithTagProcessor.doProcess(StandardWithTagProcessor.java:93) ~[?:?]
at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) ~[?:?]
at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) ~[?:?]
at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) ~[?:?]
at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314) ~[?:?]
at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[?:?]
at org.thymeleaf.engine.TemplateModel.process(TemplateModel.java:136) ~[?:?]
at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:661) ~[?:?]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[?:?]
at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1067) ~[?:?]
at org.zaproxy.addon.reports.ExtensionReports.generateReport(ExtensionReports.java:433) ~[?:?]
at org.zaproxy.addon.reports.ReportDialog.save(ReportDialog.java:501) ~[?:?]
at org.zaproxy.zap.view.StandardFieldsDialog.savePressed(StandardFieldsDialog.java:428) ~[zap-2.12.0.jar:2.12.0]
at org.zaproxy.zap.view.StandardFieldsDialog$3.actionPerformed(StandardFieldsDialog.java:411) ~[zap-2.12.0.jar:2.12.0]
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) ~[?:?]
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) ~[?:?]
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) ~[?:?]
at javax.swing.DefaultButtonModel.setPressed(Unknown Source) ~[?:?]
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) ~[?:?]
at java.awt.Component.processMouseEvent(Unknown Source) ~[?:?]
at javax.swing.JComponent.processMouseEvent(Unknown Source) ~[?:?]
at java.awt.Component.processEvent(Unknown Source) ~[?:?]
at java.awt.Container.processEvent(Unknown Source) ~[?:?]
at java.awt.Component.dispatchEventImpl(Unknown Source) ~[?:?]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:?]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:?]
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) ~[?:?]
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) ~[?:?]
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) ~[?:?]
at java.awt.Container.dispatchEventImpl(Unknown Source) ~[?:?]
at java.awt.Window.dispatchEventImpl(Unknown Source) ~[?:?]
at java.awt.Component.dispatchEvent(Unknown Source) ~[?:?]
at java.awt.EventQueue.dispatchEventImpl(Unknown Source) ~[?:?]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:?]
at java.awt.EventQueue$4.run(Unknown Source) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:?]
at java.awt.EventQueue$5.run(Unknown Source) ~[?:?]
at java.awt.EventQueue$5.run(Unknown Source) ~[?:?]
at java.security.AccessController.doPrivileged(Native Method) ~[?:?]
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) ~[?:?]
at java.awt.EventQueue.dispatchEvent(Unknown Source) ~[?:?]
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) ~[?:?]
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) ~[?:?]
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) ~[?:?]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:?]
at java.awt.EventDispatchThread.pumpEvents(Unknown Source) ~[?:?]
at java.awt.EventDispatchThread.run(Unknown Source) ~[?:?]
Caused by: ognl.OgnlException: source is null for getProperty(null, "requestHeader")
at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:3229) ~[?:?]
at ognl.ASTProperty.getValueBody(ASTProperty.java:114) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTChain.getValueBody(ASTChain.java:141) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTEq.getValueBody(ASTEq.java:51) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTAnd.getValueBody(ASTAnd.java:61) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTSequence.getValueBody(ASTSequence.java:63) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTSelectFirst.getValueBody(ASTSelectFirst.java:62) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTChain.getValueBody(ASTChain.java:141) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTNot.getValueBody(ASTNot.java:49) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTSequence.getValueBody(ASTSequence.java:63) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTSelect.getValueBody(ASTSelect.java:67) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTChain.getValueBody(ASTChain.java:141) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.ASTSequence.getValueBody(ASTSequence.java:63) ~[?:?]
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) ~[?:?]
at ognl.SimpleNode.getValue(SimpleNode.java:258) ~[?:?]
at ognl.Ognl.getValue(Ognl.java:537) ~[?:?]
at ognl.Ognl.getValue(Ognl.java:501) ~[?:?]
at org.thymeleaf.standard.expression.OGNLVariableExpressionEvaluator.executeExpression(OGNLVariableExpressionEvaluator.java:328) ~[?:?]
at org.thymeleaf.standard.expression.OGNLVariableExpressionEvaluator.evaluate(OGNLVariableExpressionEvaluator.java:170) ~[?:?]
... 55 more

Please suggest.

Best Regards,

Rakesh
ReportGeneration_Error.jpg

thc...@gmail.com

unread,
Dec 18, 2022, 10:16:39 AM12/18/22
to zaprox...@googlegroups.com
Hi.

That's an issue, those are being tracked in:
https://github.com/zaproxy/zaproxy/issues/6880

It would be great if you could provide the steps that allow to reproduce
it (or the actual session, that would make it a lot easier to fix it; If
you are ok to share the session send it to one of the core team members).

Best regards.

Rakesh Kirola

unread,
Dec 18, 2022, 10:23:30 AM12/18/22
to zaprox...@googlegroups.com
Thanks for your reply!

I will try to replicate again and share screen recording if possible.

Best Regards,

Rakesh 

--
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/339219c8-d4f2-43ef-95b5-e4a8b374ebaf%40gmail.com.
Reply all
Reply to author
Forward
0 new messages