Skip to content

Migrate erroneously shared vulnerability scanners

Summary

Vulnerabilities::Scanner records were erroneously reused across projects. This causes scanner: null GraphQL responses when querying project vulnerabilities.

Specifically, for concerned rows, the vulnerability_occurrences.project_id column mismatches the associated vulnerability_scanners.project_id.

We need to create new scanner rows and update the foreign keys of concerned findings accordingly.

Steps to reproduce

See https://gitlab.com/gitlab-org/gitlab/-/issues/354082

Example Project

https://gitlab.com/gitlab-org/protect/demos/demo-cluster

What is the current bug behavior?

See https://gitlab.com/gitlab-org/gitlab/-/issues/354082

What is the expected correct behavior?

See https://gitlab.com/gitlab-org/gitlab/-/issues/354082

Relevant logs and/or screenshots

n/a

Output of checks

n/a