Skip to content

Fix NoMethodError in Vulnerabilities::RemoveAllVulnerabilitiesWorker

What does this MR do and why?

Fix NoMethodError in Vulnerabilities::RemoveAllVulnerabilitiesWorker

Related to #433119 (closed)

How to set up and validate locally

  1. echo "Feature.enable(:enable_remove_all_vulnerabilties_from_project_mutation)" | rails c
  2. Create a new project and populate it with Vulnerabilities. You can use https://gitlab.com/gitlab-examples/security/security-reports project to do this quickly.
  3. Note down project ID
  4. Run the following mutation
mutation {
  vulnerabilitiesRemoveAllFromProject(input: { projectIds: ["gid://gitlab/Project/PROJECT_ID_HERE"]}) {
    projects {
      id
    }
  }
}
  1. Go to /-/security/vulnerability_report, it should be empty

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