Add tag details to vuln list page
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
How to set up and validate locally
- Enable CS for registry feature from security config.
- Push an image to registry and wait for CS job to finish.
- 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"}})
- 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)
- 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