Skip to content

Manually create Vulnerabilities via API

Notes to reviewers and maintainers

This MR is almost exactly the same as !61385 (merged) but here I added two things to address issues found in #10272 (comment 650202279):

  1. ee/app/graphql/types/vulnerability_location/generic_type.rb which will return empty values for description field since we don't even expose that field for user input
  2. ee/app/graphql/mutations/vulnerabilities/create.rb now wraps the errors in Array(), this is so that we don't end up calling to_a on a singular error message
  3. Create a feature flag, rollout issue: #338694 (closed)
  4. Remove requires_new: true from #transaction block due to #338730 (closed)

What does this MR do?

This MR adds an GraphQL query and underlying service object to create Vulnerability objects manually via API.

Related to #10272 (closed)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Michał Zając

Merge request reports