Skip to content

Display warning depending on vulnerability quota

Savas Vedova requested to merge 474286-add-quota-warning into master

What does this MR do and why?

Display warning depending on vulnerability quota

Depending on the quota status, display a helpful message to the end user on the vulnerability report to notify them.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

image

How to set up and validate locally

  1. Fork https://gitlab.com/gitlab-examples/security/security-reports/
  2. Create a pipeline against default branch to populate vulnerabilities
  3. Visit the Project > Secure > Vulnerability Report page
  4. Apply the following patch:
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 79fe1421fdd8..861b2a05c26a 100644
--- a/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
+++ b/ee/app/assets/javascripts/security_dashboard/vulnerability_report_init.js
@@ -81,7 +81,7 @@ export default (el, dashboardType) => {
     });
   }
 
-  let vulnerabilityQuota;
+  let vulnerabilityQuota = 'critical';
 
   if (vulnerabilityQuotaCritical !== 'false') {
     vulnerabilityQuota = 'critical';

Related to #474286

Edited by Savas Vedova

Merge request reports

Loading