Skip to content

Add awareness of whether scanners have been enabled on Security Dashboard - Frontend

frontend issue for parent issue: #214392 (closed)

Design

image

Implementation Outline

  • Create GraphQL Query to retrieve list of scanners for the current project (with enabled / disabled status)
  • Add query to ee/app/assets/javascripts/vulnerabilities/components/project_vulnerabilities_app.vue and pass data to VulnerabilityList
  • Add props to VulnerabilityList to retrieve scanner data
  • Create new component (e.g.: VulnerabilityInfoBanner) that receives the scanners-data as a prop and includes render logic (1+ scanner(s) types enabled and 1+ scanner type(s) NOT enabled - display banner) and also sets localStorage on dismissal / checks for the flag
  • Render the newly created component within the VulnerabilityList table's top-row slot (https://bootstrap-vue.org/docs/components/table#comp-ref-b-table-slots)

Proposed GraphQL schema:

enum SecurityScanner {
    SAST
    DAST
    CONTAINER_SCANNING
    SECRET_DETECTION
    LICENSE_SCANNING
    LICENSE_MANAGEMENT
    DEPENDENCY_SCANNING
}

type SecurityScanners {
    enabled: [SecurityScanner!]!
    available: [SecurityScanner!]!
    pipelineRun: [SecurityScanner!]!
}

extend type Project {
    securityScanners: SecurityScanners
}
Edited by David Pisek