Generate system notes for same state dismissals
What does this MR do and why?
Generate system notes for same state dismissals.
Validation is already available here and will rescued here.
Related issue: #404570 (closed)
Screenshots or screen recordings
How to set up and validate locally
-
Go to a the vulnerability page of a respective vulnerability (i.e., http:///<PROJECT_FULL_PATH>/-/security/vulnerabilities/<VULNERABILITY_ID>)
-
Trigger the dismissal for different
dismissalReason
via Graphql as the following:
mutation {
vulnerabilityDismiss( input: {id: "gid://gitlab/Vulnerability/697", dismissalReason: ACCEPTABLE_RISK}){
vulnerability {
state
stateTransitions {
nodes {
dismissalReason
createdAt
fromState
toState
}
}
}
}
}
Expectation:
Graphql response should be similar to the following:
{
"data": {
"vulnerabilityDismiss": {
"vulnerability": {
"state": "DISMISSED",
"stateTransitions": {
"nodes": [
{
"dismissalReason": "ACCEPTABLE_RISK",
"createdAt": "2023-04-05T10:21:18Z",
"fromState": "DISMISSED",
"toState": "DISMISSED"
},
{
"dismissalReason": "NOT_APPLICABLE",
"createdAt": "2023-04-05T10:21:00Z",
"fromState": "DISMISSED",
"toState": "DISMISSED"
},
{
"dismissalReason": "FALSE_POSITIVE",
"createdAt": "2023-04-05T10:20:50Z",
"fromState": "DETECTED",
"toState": "DISMISSED"
}
]
}
}
}
}
}
Vulnerability page should include system notes similar to this screenshot
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Zamir Martins