Skip to content
GitLab
Next
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #214392

Add awareness of whether scanners have been enabled on Security Dashboard

Problem to solve

Currently there's no way to see which scanners have been enabled from the Security Dashboard. For example, if only Container Scanning and DAST are enabled, and these scanners are reporting vulnerabilities to the list, there's no way to tell that Dependency Scanning and SAST are available but not enabled.

Solution

1st alert: For pipeline has not been run yet:
Step 1 (view alert) Step 2 (where the link takes the user)
image Screen_Shot_2020-05-25_at_4.28.11_PM
2nd alert: For scanners have not been enabled:
Step 1 (view alert) Step 2 (where the link takes the user)
image Screen_Shot_2020-05-25_at_5.03.24_PM
3rd alert: For some combination of the two:

image * (updated copy per #221156 (comment 371836715): SAST results are not available because a pipeline has not been run or the most recent pipeline did not succeed.)

More info

Scenario Result
1+ scanner(s) types filtered, all enabled, vulns found Shown vulnerability list
1+ scanner(s) types filtered, all enabled, NO vulns found Show empty state in #200003 (comment 332428400)
1+ scanner(s) types filtered, NONE enabled Show empty state in #200003 (comment 332428400)
⭐️ 1+ scanner(s) types filtered, all enabled, pipeline has not been run yet ⭐️ ⭐️ Show 1st alert above vulnerability list ⭐️
⭐️ 1+ scanner(s) types enabled and 1+ scanner type(s) NOT enabled ⭐️ ⭐️ Show 2nd alert above vulnerability list ⭐️
⭐️ Some combination of the above 2 (1+ scanner type(s) hasn't had a pipeline run yet + 1+ scanner type(s) hasn't been enabled yet ⭐️ ⭐️ Show 3rd alert above vulnerability list ⭐️
1+ scanner(s) types filtered, all scanner type(s) enabled, some scanners found vulns but others didn't Only show found vulnerabilities in list

⭐️ = this issue

The alerts should be stored on a user's machine locally and should not reappear again after it's been dismissed, so that we don't have to worry about them having to dismiss it every time they come to the page.

Context

Discussion and feedback here from Explore improving banners and other awareness communication on dashboards

Implementation

frontend #218509 (closed)

backend #221156 (closed)

GraphQL

Query

{
  project(fullPath: "ssarka/demo-historic-secrets") {
    securityScanners {
      enabled
      available
      pipelineRun
    }
  }
}

Result

{
  "data": {
    "project": {
      "securityScanners": {
        "enabled": ["SAST","DAST"],
        "available": ["SAST", "DAST", "CONTAINER_SCANNING","SECRET_DETECTION", "DEPENDENCY_SCANNING"],
        "pipelineRun": ["DAST"]
      }
    }
  }
}

cc @tmccaslin @kmann @cam.x @vkarnes @andyvolpe

Edited Jul 06, 2020 by David Pisek
Assignee
Assign to
Time tracking