Skip to content

Show pipeline parsing error in the Vulnerability Report

What does this MR do and why?

This adds a warning to the Vulnerability Report when parsing errors were encountered in the pipelines that populated the report.

Screenshots or screen recordings

Before After
Desktop Screen_Shot_2022-07-12_at_11.16.49_AM Screen_Shot_2022-07-18_at_3.01.00_PM
Mobile Screen_Shot_2022-07-12_at_11.17.20_AM Screen_Shot_2022-07-18_at_3.07.45_PM
Errors and warnings
Screen_Shot_2022-07-13_at_12.11.15_PM
Warnings
Screen_Shot_2022-07-13_at_12.11.40_PM

How to set up and validate locally

  1. Apply one of the following patches to override the boolean flags' values:
Parsing errors and warnings
diff --git a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
index 7ce0aebd4c5..85ee29f4e53 100644
--- a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
+++ b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
@@ -104,8 +104,8 @@ export default (el, dashboardType) => {
       path: pipelinePath,
       securityBuildsFailedCount: Number(pipelineSecurityBuildsFailedCount),
       securityBuildsFailedPath: pipelineSecurityBuildsFailedPath,
-      hasParsingErrors: parseBoolean(pipelineHasErrors),
-      hasParsingWarnings: parseBoolean(pipelineHasWarnings),
+      hasParsingErrors: true,
+      hasParsingWarnings: true,
     };
   }
 
Parsing errors
diff --git a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
index 7ce0aebd4c5..85ee29f4e53 100644
--- a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
+++ b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
@@ -104,8 +104,8 @@ export default (el, dashboardType) => {
       path: pipelinePath,
       securityBuildsFailedCount: Number(pipelineSecurityBuildsFailedCount),
       securityBuildsFailedPath: pipelineSecurityBuildsFailedPath,
-      hasParsingErrors: parseBoolean(pipelineHasErrors),
-      hasParsingWarnings: parseBoolean(pipelineHasWarnings),
+      hasParsingErrors: true,
+      hasParsingWarnings: false,
     };
   }
 
Parsing warnings
diff --git a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
index 7ce0aebd4c5..85ee29f4e53 100644
--- a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
+++ b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
@@ -104,8 +104,8 @@ export default (el, dashboardType) => {
       path: pipelinePath,
       securityBuildsFailedCount: Number(pipelineSecurityBuildsFailedCount),
       securityBuildsFailedPath: pipelineSecurityBuildsFailedPath,
-      hasParsingErrors: parseBoolean(pipelineHasErrors),
-      hasParsingWarnings: parseBoolean(pipelineHasWarnings),
+      hasParsingErrors: false,
+      hasParsingWarnings: true,
     };
   }
 
  1. Navigate to the project's vulnerability report at Security & Compliance > Vulnerability Report.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #355944 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading