Add `securityFindingRevertToDetected` mutation
Why are we doing this work
We want to add the ability to revert the security report finding back to detected, similar to Mutation.vulnerabilityRevertToDetected
. This will require the following arguments:
-
uuid
: security report finding UUID (String
)
Example of new mutation:
mutation {
securityFindingRevertToDetected(input: {
uuid: "security finding uuid"
}) {
securityReportFinding {
<PipelineSecurityReportFinding type>
}
}
}
Sample Response:
{
"data": {
"securityReportFinding": {
{
<PipelineSecurityReportFinding type>
}
}
}
}
Relevant links
Non-functional requirements
-
Documentation: Update the GraphQL docs -
Testing: Add appropriate GraphQL mutation specs in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/spec/graphql/mutations/security/finding/revert_to_detected_spec.rb (new file) - Test all fields
- Test for missing arguments
- Test for no dismissal exists
- Test to confirm dismissal is removed
Implementation plan
-
MR 1: Add Add securityFindingRevertToDetected
mutation in https://gitlab.com/gitlab-org/gitlab/-/blob/master/ee/app/graphql/mutations/security/finding/revert_to_detected.rb (new file)
Verification steps
Test query on a dismissed security finding (can use securityFindingDismiss
:
mutation {
securityFindingRevertToDetected(input: {
uuid: "security finding uuid"
}) {
securityReportFinding {
<PipelineSecurityReportFinding type>
}
}
}
-
Because this is a GraphQl change, please run e2e:package-and-test
manual job in the MR pipeline and ensureGovern
specs are green.
Edited by Harsha Muralidhar