Skip to content

Display diff-based scans banner

What does this MR do and why?

When diff-based scans are enabled, we want to display a banner in the UI that notifies users about existing pipeline being a diff-based scan. This MR implements that logic.

References

Screenshots or screen recordings

Enabled:

image

Not enabled:

image

How to set up and validate locally

  1. Enable feature flag: echo "Feature.enable(:vulnerability_partial_scans)" | rails c
  2. Create an empty project
  3. Create an MR to add the .gitlab-ci.yml with the following content:
sast:
  stage: test
  script: wget https://gitlab.com/gitlab-org/gitlab/-/raw/5d7bc4e75ae688b968a6debc0b8f62e7eb1f54d1/ee/spec/fixtures/security_reports/master/gl-sast-report-differential.json
  artifacts:
    reports:
      sast: gl-sast-report-differential.json
  1. Visit the pipeline vulnerability report and see the banner

MR acceptance checklist

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

Related to #543639 (closed)

Edited by Savas Vedova

Merge request reports

Loading