Updates the groupedReportText builder
What does this MR do?
This MR updates the groupTextBuilder
function. Instead of displaying the new, fixed, and dismissed vulnerabilties; we display the critical, high and other vulnerabilities.
e.g. Security scanning detected 4 new, 2 fixed, and 1 dismissed vulnerabilities
would become Security scanning detected 2 critical and 4 high severity vulnerabilities out of 13.
.
In order to do this, I've had to update the text builder itself, along with the various getters and functions that supply this function with data.
The bulk of this MR updates the tests to both check for the new strings, and provide better mocks so the function, functions.
Note
The groupedTextBuilder
function used to have rather vonfusing if/else statements. I've replaced this with something akin to bitwise flags](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Flags_and_bitmasks). Check that link out or, better yet, have a video
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides - [-] Database guides
-
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers - [-] Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
- [-] Label as security and @ mention
@gitlab-com/gl-security/appsec
- [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
- [-] Security reports checked/validated by a reviewer from the AppSec team
Touches #216140 (closed)