Skip to content

Add tag details to vuln list page

Aditya Tiwari requested to merge 448307-add-tag-details-to-vuln-list-page into master

What does this MR do and why?

Add tag details to vuln list page

Add tag details to vulnerability list page.

Changelog: added EE: true

MR acceptance checklist

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

Screenshots or screen recordings

Screenshot_2024-08-28_at_6.14.16_PM

How to set up and validate locally

  1. Enable CS for registry feature from security config.
  2. Push an image to registry and wait for CS job to finish.
  3. There is an existing bug preventing the testing in gdk. Update the sbom_occurrence.source like this to fix it source.update!(source: {"image"=>{"tag"=>"5000/root/container-scanning/foobar20", "name"=>"gdk.test:5000/root/container-scanning/foobar20"}, "operating_system"=>{"name"=>"alpine", "version"=>"3.19.1"}})
  4. Use the following code in console to create a vuln.
    Click to expand

occurrence = Sbom::Occurrence.last
affected_components = [Gitlab::VulnerabilityScanning::PossiblyAffectedComponent
.from_sbom_occurrence(occurrence)]

advisory = FactoryBot.build(:vs_advisory)

response = ::Security::VulnerabilityScanning::CreateVulnerabilityService.execute(
advisory: advisory, affected_components: affected_components)
  1. Go to vulnerabilities list page and inspect the output of projectVulnerabilities graphql endpoint.

Numbered steps to set up and validate the change are strongly suggested.

Related to #448307 (closed)

Edited by Aditya Tiwari

Merge request reports

Loading