Skip to content

reports: Add support for script diagnostics in all Traditional Reports#7377

Draft
kingthorin wants to merge 1 commit into
zaproxy:mainfrom
kingthorin:scr-diags-rpts
Draft

reports: Add support for script diagnostics in all Traditional Reports#7377
kingthorin wants to merge 1 commit into
zaproxy:mainfrom
kingthorin:scr-diags-rpts

Conversation

@kingthorin
Copy link
Copy Markdown
Member

Overview

Added a new section to all Traditional Reports (JSON plus was done in a previous PR) for script diagnostics details.

Related issues

AI Disclosure

Cursor was used in preparation of this change/PR.

@psiinon
Copy link
Copy Markdown
Member

psiinon commented May 20, 2026

Logo
Checkmarx One – Scan Summary & Details3b40952b-2895-45e8-9470-1fbc0a2a9d6c


New Issues (2) Checkmarx found the following issues in this Pull Request
# Severity Issue Source File / Package Checkmarx Insight
1 HIGH Improper_Restriction_of_Stored_XXE_Ref addOns/reports/src/test/java/org/zaproxy/addon/reports/ReportTestUtils.java: 434
detailsThe loads and parses XML using parse, at line 493 of /addOns/reports/src/test/java/org/zaproxy/addon/reports/ExtensionReportsXmlUnitTest.java. ...
Attack Vector
2 HIGH Improper_Restriction_of_Stored_XXE_Ref addOns/reports/src/test/java/org/zaproxy/addon/reports/ReportTestUtils.java: 434
detailsThe loads and parses XML using parse, at line 514 of /addOns/reports/src/test/java/org/zaproxy/addon/reports/ExtensionReportsXmlUnitTest.java. ...
Attack Vector

Use @Checkmarx to interact with Checkmarx PR Assistant.
Examples:
@Checkmarx how are you able to help me?
@Checkmarx rescan this PR

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds a new “Script Diagnostics” section to all Traditional report formats (XML, JSON, HTML, PDF, and Markdown) so that recorded script run diagnostics (for example, failed automation runs) are visible in generated reports.

Changes:

  • Added Script Diagnostics rendering to Traditional report templates across XML/JSON/HTML/PDF/Markdown.
  • Added/updated i18n strings and help documentation describing the new section.
  • Added new/updated unit tests and shared assertions to validate Script Diagnostics output across formats.

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
addOns/reports/src/test/java/org/zaproxy/addon/reports/ScriptDiagnosticsReportAssertions.java Introduces shared JSON/XML assertions for script diagnostics content in traditional reports.
addOns/reports/src/test/java/org/zaproxy/addon/reports/ExtensionReportsXmlUnitTest.java Adds XML/XML+ tests to validate script diagnostics output.
addOns/reports/src/test/java/org/zaproxy/addon/reports/ExtensionReportsUnitTest.java Adds HTML/HTML+ and PDF tests for script diagnostics presence/omission.
addOns/reports/src/test/java/org/zaproxy/addon/reports/ExtensionReportsMdUnitTest.java Adds Markdown tests for script diagnostics presence/omission.
addOns/reports/src/test/java/org/zaproxy/addon/reports/ExtensionReportsJsonUnitTest.java Refactors JSON+ assertions to shared helper and adds Traditional JSON script diagnostics test.
addOns/reports/src/main/zapHomeFiles/reports/traditional-xml/report.xml Adds <scriptDiagnostics> element generation when diagnostics exist.
addOns/reports/src/main/zapHomeFiles/reports/traditional-xml-plus/report.xml Adds <scriptDiagnostics> element generation when diagnostics exist.
addOns/reports/src/main/zapHomeFiles/reports/traditional-pdf/template.yaml Enables scriptdiagnostics as a selectable section for Traditional PDF.
addOns/reports/src/main/zapHomeFiles/reports/traditional-pdf/report.html Adds Script Diagnostics section rendering for PDF output (HTML template).
addOns/reports/src/main/zapHomeFiles/reports/traditional-pdf/Messages.properties Adds section label for scriptdiagnostics in PDF template messages.
addOns/reports/src/main/zapHomeFiles/reports/traditional-md/template.yaml Enables scriptdiagnostics as a selectable section for Traditional Markdown.
addOns/reports/src/main/zapHomeFiles/reports/traditional-md/report.md Adds Script Diagnostics section rendering for Markdown output.
addOns/reports/src/main/zapHomeFiles/reports/traditional-md/Messages.properties Adds section label for scriptdiagnostics in Markdown template messages.
addOns/reports/src/main/zapHomeFiles/reports/traditional-json/report.json Adds scriptDiagnostics object output when diagnostics exist.
addOns/reports/src/main/zapHomeFiles/reports/traditional-html/template.yaml Enables scriptdiagnostics as a selectable section for Traditional HTML.
addOns/reports/src/main/zapHomeFiles/reports/traditional-html/report.html Adds Script Diagnostics section rendering for HTML output.
addOns/reports/src/main/zapHomeFiles/reports/traditional-html/Messages.properties Adds section label for scriptdiagnostics in HTML template messages.
addOns/reports/src/main/zapHomeFiles/reports/traditional-html-plus/template.yaml Enables scriptdiagnostics as a selectable section for Traditional HTML+.
addOns/reports/src/main/zapHomeFiles/reports/traditional-html-plus/report.html Adds Script Diagnostics section rendering for HTML+ output.
addOns/reports/src/main/zapHomeFiles/reports/traditional-html-plus/Messages.properties Adds section label for scriptdiagnostics in HTML+ template messages.
addOns/reports/src/main/resources/org/zaproxy/addon/reports/resources/Messages.properties Adds report-level i18n strings for script diagnostics table headers/title.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-xml.html Documents Script Diagnostics section for Traditional XML report.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-xml-plus.html Documents Script Diagnostics section for Traditional XML+ report.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-pdf.html Documents scriptdiagnostics section for Traditional PDF report.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-markdown.html Documents scriptdiagnostics section for Traditional Markdown report.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-json.html Documents Script Diagnostics object/array for Traditional JSON report.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-html.html Documents scriptdiagnostics section for Traditional HTML report.
addOns/reports/src/main/javahelp/org/zaproxy/addon/reports/resources/help/contents/report-traditional-html-plus.html Documents scriptdiagnostics section for Traditional HTML+ report.
addOns/reports/CHANGELOG.md Updates changelog entry to reflect script diagnostics support across all Traditional reports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kingthorin kingthorin force-pushed the scr-diags-rpts branch 2 times, most recently from d355b63 to 534edf9 Compare May 20, 2026 23:56
@kingthorin kingthorin requested a review from Copilot May 20, 2026 23:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 32 out of 32 changed files in this pull request and generated no new comments.

@kingthorin kingthorin force-pushed the scr-diags-rpts branch 3 times, most recently from b9a7883 to 40cc755 Compare May 21, 2026 10:35
@kingthorin
Copy link
Copy Markdown
Member Author

Ready

Signed-off-by: kingthorin <kingthorin@users.noreply.github.com>
@thc202
Copy link
Copy Markdown
Member

thc202 commented May 23, 2026

This should wait for #7393.

@kingthorin kingthorin marked this pull request as draft May 23, 2026 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants