Investigate and find the reason why vulnerability_id is nil in some vulnerability findings

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Context: #541995 (comment 2519808338)

No vulnerability associated with a finding can cause issues further downstream:

  1. vulnerability_id was nil on some findings
  2. This lead to identifiers being nil
  3. we return [] for identifiers
  4. A policy failure happens:
    • undefined method project' for nil:Representation::VulnerabilityScannerEntry (NoMethodError)`
    • sentry error: GITLABCOM-8M3E

Internal data: #541995 (comment 2521085639)

Edited by 🤖 GitLab Bot 🤖