Skip to content

Updates the groupedReportText builder

Sam Beckham requested to merge 216140-grouped-report-text into master

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

Screen_Shot_2020-06-05_at_16.38.56

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

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)

Edited by Sam Beckham

Merge request reports