Skip to content

Remove duplicated false positives alert

What does this MR do and why?

We recently added the false positives alert to the shared vulnerability-details component but the alert is still rendered in the parent component (vulnerability). This causes the alert to show up twice on the vulnerability details page. This removes the alert from the page to only rely on the shared component's.

Here's a bit more context on why the bug made its way to production: #364781 (comment 1036062790)

Screenshots or screen recordings

Before After
Screen_Shot_2022-07-22_at_6.09.35_PM Screen_Shot_2022-07-22_at_6.09.22_PM

How to set up and validate locally

  1. In a project's vulnerability report, find a vulnerability that's marked as a false positive.
    • If you can't find one, you can mark any vulnerability as a false positive by running the following in the Rails console:
    vuln = Vulnerability.find(<id>) # replace `<id>` with the ID of the vulnerability you want to mark as a false positive.
    flag = Vulnerabilities::Flag.new(finding: vuln.finding, origin: "", description: "This is a false positive")
    flag.save
  2. Click on the vulnerability to open the details page.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #368622 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading