Show "No available solution" message for CS when solution is empty

What does this MR do and why?

Recently, a change was made to the container scanning analyzer (container-scanning!3342), where if no solution is found, the solution field is now emitted as an empty string instead of "No solution provided".

However, this causes the UI to not show any string in the remediation section, which customers are expecting for container scanning (CS) findings. This MR shows a "No available solution" message in that section, but only for CS findings when the solution field is empty.

This is applied in two places:

  • the vulnerability details page, and
  • the pipeline finding modal.

References

Screenshots

Vulnerability details page

Before After
before-vun-details after-vuln-details

Pipeline finding modal

Before After
before-finding-modal after-finding-modal

How to set up and validate locally

  1. Have a container scanning finding whose solution is empty (i.e. no upstream fix). The seeded GDK vulnerability data includes such findings.
  2. Open the vulnerability details page for that finding and confirm the Remediation section shows "No available solution".
  3. Open the finding from a pipeline's security tab and confirm the Remediation Guidance card in the modal shows "No available solution".
  4. Confirm a non-CS finding with no solution still hides the remediation section, and a CS finding with a solution still shows it.
Edited by Lorenz van Herwaarden

Merge request reports

Loading
Loading