Skip to content

Show dismissed finding for query

What does this MR do and why?

This MR fixes a bug where a singular securityReportFinding would not return the finding data if it was dismissed.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

  1. Have a sample project and run a pipeline to generate report findings (https://gitlab.com/gitlab-examples/security/security-reports for example).
  2. Run query on the pipeline to get the uuid of a finding
{
  project(fullPath: "<project path>") {
    pipeline(iid: "1") {
      id
      securityReportFindings(first: 1) {
        nodes {
          title
          uuid
        }
      }
    }
  }
}
  1. Dismiss the finding
mutation {
  securityFindingDismiss(input:{uuid:"<finding_uuid>"}) {
    clientMutationId
    uuid
  }
}
  1. Query for the finding. On the main branch, it should return null. On the change branch, data should be populated.
{
  project(fullPath: "<project path>") {
    pipeline(iid: "1") {
      nodes {
        securityReportFinding(uuid: "<finding_uuid>uypdate") {
          uuid
          state
          title
        }
      }
    }
  }
}

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #385451 (closed)

Merge request reports