Find or initialize Scanners using project_id
Add `project_id` as argument to `find_or_initialize_by` so the scanners are created in the correct project if they don't exist within that project already. This prevents the following scenario: 1. No scanner called `gitlab-manual-vulnerability-report` exists in any project. 2. Project A creates a vulnerability manually. 3. `gitlab-manual-vulnerability-report` scanner gets created within project A. 4. Project B creates a vulnerability manually. 5. Project B users don't see any scanner attached to the finding because it's actually attached to the scanner created in step 3 and they don't have access to that scanner. Fixing this 100% will require a data migration which will be performed later on. See https://gitlab.com/gitlab-org/gitlab/-/issues/355802 Changelog: fixed EE: true
Showing
Please register or sign in to comment