GraphQL mutation to dismiss Security Finding
<!-- Implementation issues are used break-up a large piece of work into small, discrete tasks that can move independently through the build workflow steps. They're typically used to populate a Feature Epic. Once created, an implementation issue is usually refined in order to populate and review the implementation plan and weight. Example workflow: https://about.gitlab.com/handbook/engineering/development/threat-management/planning/diagram.html#plan --> ## Why are we doing this work Following https://gitlab.com/gitlab-org/gitlab/-/issues/360478+, we are able to use the UUID of a vulnerability finding to dismiss it. However, this does not work for security findings. This is necessary to be able to dismiss vulnerabilities from the pipeline as we currently do, without the need for a vulnerability finding. The way this mutation currently works, is that is searches for a vulnerability finding by `uuid` or `id` (`id` to be deprecated in 16.0) ## Relevant links - [Related Issue](https://gitlab.com/gitlab-org/gitlab/-/issues/360478) ## Non-functional requirements - [x] Testing: Add tests for dismissing security findings with or without vulnerability findings ## Implementation plan - [x] ~backend Create a new mutation called `dismissSecurityReportFinding` based on `vulnerabilityFindingDismiss` - [x] ~backend Deprecate `vulnerabilityFindingDismiss` <!-- Workflow and other relevant labels # ~"group::" ~"Category:" ~"GitLab Ultimate" Other settings you might want to include when creating the issue. # /assign @ # /epic & --> ## Verification steps 1. Get the uuid of a non-dismissed finding ``` query pipelineFindings { project(fullPath: "<project path>") { pipeline(iid:"<pipeline iid>") { securityReportFindings(first:1) { nodes { uuid state } } } } } ``` 2. Call the dismiss mutation ``` mutation { securityFindingDismiss(input:{uuid:"<uuid>"}) { uuid } } ``` 3. Check the finding state again ``` query pipelineFindings { project(fullPath: "<project path>") { pipeline(iid:"<pipeline iid>") { securityReportFindings(first:1) { nodes { uuid state } } } } } ```
issue