Skip to content

Fix nil value in location column in vulnerability_occurrences

Sashi Kumar Kumaresan requested to merge sk/342025-fix-vuln-location into master

What does this MR do and why?

Addresses #342025 (closed)

While verifying #338669 (closed), we found that there are many rows in vulnerability_occurrences table with nil value in location column. This makes filtering the vulnerabilities by image impossible.

Steps to reproduce

  1. Run container scanning job for a project following the documentation
  2. After the job is complete, in rails console:
Vulnerabilities::Finding.where(report_type: 2, location: nil).count

MR acceptance checklist

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

Merge request reports

Loading