Fix nil value in location column in vulnerability_occurrences
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
- Run container scanning job for a project following the documentation
- 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.
-
I have evaluated the MR acceptance checklist for this MR.