From 24f9ca7178a13273844bbe710a0bb37db179ad03 Mon Sep 17 00:00:00 2001 From: Luca Ciucci Date: Fri, 2 May 2025 17:31:15 +0200 Subject: [PATCH] sca: add HTML summary and full report options to ECLAIR configuration Introduce ECLAIR_SUMMARY_HTML and ECLAIR_FULL_HTML CMake options to enable the generation of HTML reports. Signed-off-by: Luca Ciucci --- cmake/sca/eclair/sca.cmake | 6 ++++++ cmake/sca/eclair/sca_options.cmake | 2 ++ doc/develop/sca/eclair.rst | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/cmake/sca/eclair/sca.cmake b/cmake/sca/eclair/sca.cmake index bf128de1dd6..0c98bd174fc 100644 --- a/cmake/sca/eclair/sca.cmake +++ b/cmake/sca/eclair/sca.cmake @@ -84,6 +84,9 @@ endif() if (ECLAIR_SUMMARY_ODT) list(APPEND ECLAIR_REPORT_ADDITIONAL_OPTIONS "-summary_odt=${ECLAIR_OUTPUT_DIR}/summary_odt") endif() +if (ECLAIR_SUMMARY_HTML) + list(APPEND ECLAIR_REPORT_ADDITIONAL_OPTIONS "-summary_html=${ECLAIR_OUTPUT_DIR}/summary_html") +endif() if (ECLAIR_FULL_TXT_ALL_AREAS) list(APPEND ECLAIR_REPORT_ADDITIONAL_OPTIONS "-setq=report_areas,areas") endif() @@ -105,6 +108,9 @@ endif() if (ECLAIR_FULL_ODT) list(APPEND ECLAIR_REPORT_ADDITIONAL_OPTIONS "-full_odt=${ECLAIR_OUTPUT_DIR}/report_full_odt") endif() +if (ECLAIR_FULL_HTL) + list(APPEND ECLAIR_REPORT_ADDITIONAL_OPTIONS "-full_html=${ECLAIR_OUTPUT_DIR}/report_full_html") +endif() message(STATUS "ECLAIR outputs have been written to: ${ECLAIR_OUTPUT_DIR}") message(STATUS "ECLAIR ECB files have been written to: ${ECLAIR_ANALYSIS_DATA_DIR}") diff --git a/cmake/sca/eclair/sca_options.cmake b/cmake/sca/eclair/sca_options.cmake index fb886f1cdda..210a56df0e5 100644 --- a/cmake/sca/eclair/sca_options.cmake +++ b/cmake/sca/eclair/sca_options.cmake @@ -20,9 +20,11 @@ option(ECLAIR_REPORTS_SARIF "Findings in sarif JSON format" ON) option(ECLAIR_SUMMARY_TXT "Plain textual summary format" OFF) option(ECLAIR_SUMMARY_DOC "DOC summary format" OFF) option(ECLAIR_SUMMARY_ODT "ODT summary format" OFF) +option(ECLAIR_SUMMARY_HTML "HTML summary format" OFF) option(ECLAIR_FULL_TXT "Detailed plain textual format" ON) option(ECLAIR_FULL_DOC "Detailed DOC format" OFF) option(ECLAIR_FULL_ODT "Detailed ODT format" OFF) +option(ECLAIR_FULL_HTML "Detailed HTML format" OFF) cmake_dependent_option(ECLAIR_FULL_DOC_ALL_AREAS "Show all areas in a full doc report" OFF "ECLAIR_FULL_DOC OR ECLAIR_FULL_ODT" OFF) diff --git a/doc/develop/sca/eclair.rst b/doc/develop/sca/eclair.rst index 8b6bf9da814..5259c882962 100644 --- a/doc/develop/sca/eclair.rst +++ b/doc/develop/sca/eclair.rst @@ -135,12 +135,16 @@ default ecd file. Following additional reports and report formats can be generat * Summary report in ODT format. +* Summary report in HTML format. + * Detailed reports in txt format. * Detailed report in DOC format. * Detailed report in ODT format. +* Detailed report in HTML format. + Related CMake options: * ``ECLAIR_METRICS_TAB`` @@ -149,9 +153,11 @@ Related CMake options: * ``ECLAIR_SUMMARY_TXT`` * ``ECLAIR_SUMMARY_DOC`` * ``ECLAIR_SUMMARY_ODT`` +* ``ECLAIR_SUMMARY_HTML`` * ``ECLAIR_FULL_TXT`` * ``ECLAIR_FULL_DOC`` * ``ECLAIR_FULL_ODT`` +* ``ECLAIR_FULL_HTML`` Detail level of full reports ============================