Commit 1ef6230f authored by Michał Zając's avatar Michał Zając

Remove scanner_type argument from GraphQL mutation

There's no such a thing as scanner_type anywhere in the database. We
have a report_type which we're setting to `generic` if the Vulnerability
is created via this GraphQL migration. This was agreed on in
https://gitlab.com/gitlab-org/gitlab/-/issues/10272#note_577520606

This doesn't need to follow any deprecation process since it wasn't
released yet and is under a feature flag.

Changelog: changed
EE: true
parent 2c314d78
...@@ -4478,7 +4478,6 @@ Input type: `VulnerabilityCreateInput` ...@@ -4478,7 +4478,6 @@ Input type: `VulnerabilityCreateInput`
| <a id="mutationvulnerabilitycreateproject"></a>`project` | [`ProjectID!`](#projectid) | ID of the project to attach the vulnerability to. | | <a id="mutationvulnerabilitycreateproject"></a>`project` | [`ProjectID!`](#projectid) | ID of the project to attach the vulnerability to. |
| <a id="mutationvulnerabilitycreateresolvedat"></a>`resolvedAt` | [`Time`](#time) | Timestamp of when the vulnerability state changed to resolved (defaults to creation time if status is `resolved`). | | <a id="mutationvulnerabilitycreateresolvedat"></a>`resolvedAt` | [`Time`](#time) | Timestamp of when the vulnerability state changed to resolved (defaults to creation time if status is `resolved`). |
| <a id="mutationvulnerabilitycreatescannername"></a>`scannerName` | [`String!`](#string) | Name of the security scanner used to discover the vulnerability. | | <a id="mutationvulnerabilitycreatescannername"></a>`scannerName` | [`String!`](#string) | Name of the security scanner used to discover the vulnerability. |
| <a id="mutationvulnerabilitycreatescannertype"></a>`scannerType` | [`SecurityScannerType!`](#securityscannertype) | Type of the security scanner used to discover the vulnerability. |
| <a id="mutationvulnerabilitycreateseverity"></a>`severity` | [`VulnerabilitySeverity`](#vulnerabilityseverity) | Severity of the vulnerability (defaults to `unknown`). | | <a id="mutationvulnerabilitycreateseverity"></a>`severity` | [`VulnerabilitySeverity`](#vulnerabilityseverity) | Severity of the vulnerability (defaults to `unknown`). |
| <a id="mutationvulnerabilitycreatesolution"></a>`solution` | [`String`](#string) | How to fix this vulnerability. | | <a id="mutationvulnerabilitycreatesolution"></a>`solution` | [`String`](#string) | How to fix this vulnerability. |
| <a id="mutationvulnerabilitycreatestate"></a>`state` | [`VulnerabilityState`](#vulnerabilitystate) | State of the vulnerability (defaults to `detected`). | | <a id="mutationvulnerabilitycreatestate"></a>`state` | [`VulnerabilityState`](#vulnerabilitystate) | State of the vulnerability (defaults to `detected`). |
......
...@@ -19,10 +19,6 @@ module Mutations ...@@ -19,10 +19,6 @@ module Mutations
required: true, required: true,
description: 'Description of the vulnerability.' description: 'Description of the vulnerability.'
argument :scanner_type, Types::SecurityScannerTypeEnum,
required: true,
description: 'Type of the security scanner used to discover the vulnerability.'
argument :scanner_name, GraphQL::Types::String, argument :scanner_name, GraphQL::Types::String,
required: true, required: true,
description: 'Name of the security scanner used to discover the vulnerability.' description: 'Name of the security scanner used to discover the vulnerability.'
...@@ -118,8 +114,7 @@ module Mutations ...@@ -118,8 +114,7 @@ module Mutations
]) ])
scanner_params = { scanner_params = {
name: params.fetch(:scanner_name), name: params.fetch(:scanner_name)
type: params.fetch(:scanner_type)
} }
{ {
......
...@@ -32,7 +32,6 @@ RSpec.describe Mutations::Vulnerabilities::Create do ...@@ -32,7 +32,6 @@ RSpec.describe Mutations::Vulnerabilities::Create do
project: project_gid, project: project_gid,
title: "Test vulnerability", title: "Test vulnerability",
description: "Test vulnerability created via GraphQL", description: "Test vulnerability created via GraphQL",
scanner_type: "dast",
scanner_name: "My custom DAST scanner", scanner_name: "My custom DAST scanner",
identifiers: [identifier_attributes], identifiers: [identifier_attributes],
state: "detected", state: "detected",
...@@ -74,7 +73,6 @@ RSpec.describe Mutations::Vulnerabilities::Create do ...@@ -74,7 +73,6 @@ RSpec.describe Mutations::Vulnerabilities::Create do
project: project_gid, project: project_gid,
title: "Test vulnerability", title: "Test vulnerability",
description: "Test vulnerability created via GraphQL", description: "Test vulnerability created via GraphQL",
scanner_type: "dast",
scanner_name: "My custom DAST scanner", scanner_name: "My custom DAST scanner",
identifiers: [identifier_attributes], identifiers: [identifier_attributes],
state: "detected", state: "detected",
...@@ -122,7 +120,6 @@ RSpec.describe Mutations::Vulnerabilities::Create do ...@@ -122,7 +120,6 @@ RSpec.describe Mutations::Vulnerabilities::Create do
project: project_gid, project: project_gid,
title: "Test vulnerability", title: "Test vulnerability",
description: "Test vulnerability created via GraphQL", description: "Test vulnerability created via GraphQL",
scanner_type: "dast",
scanner_name: "My custom DAST scanner", scanner_name: "My custom DAST scanner",
identifiers: [identifier_attributes], identifiers: [identifier_attributes],
state: state, state: state,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment