Commit ce6d8cff authored by Bob Van Landuyt's avatar Bob Van Landuyt

Merge branch 'docs/graphql-VulnerabilityDismissalReason' into 'master'

Describe VulnerabilityDismissalReason GraphQL enum

See merge request gitlab-org/gitlab!50737
parents 32a1fe8c 82109595
......@@ -26061,10 +26061,29 @@ type VulnerabilityDismissPayload {
The dismissal reason of the Vulnerability
"""
enum VulnerabilityDismissalReason {
"""
The likelihood of the Vulnerability occurring and its impact are deemed acceptable
"""
ACCEPTABLE_RISK
"""
The Vulnerability was incorrectly identified as being present
"""
FALSE_POSITIVE
"""
There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable
"""
MITIGATING_CONTROL
"""
Other reasons for dismissal
"""
NOT_APPLICABLE
"""
The Vulnerability is used in tests and does not pose an actual risk
"""
USED_IN_TESTS
}
......
......@@ -75560,31 +75560,31 @@
"enumValues": [
{
"name": "ACCEPTABLE_RISK",
"description": null,
"description": "The likelihood of the Vulnerability occurring and its impact are deemed acceptable",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "FALSE_POSITIVE",
"description": null,
"description": "The Vulnerability was incorrectly identified as being present",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "MITIGATING_CONTROL",
"description": null,
"description": "There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "USED_IN_TESTS",
"description": null,
"description": "The Vulnerability is used in tests and does not pose an actual risk",
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "NOT_APPLICABLE",
"description": null,
"description": "Other reasons for dismissal",
"isDeprecated": false,
"deprecationReason": null
}
......@@ -4945,11 +4945,11 @@ The dismissal reason of the Vulnerability.
| Value | Description |
| ----- | ----------- |
| `ACCEPTABLE_RISK` | |
| `FALSE_POSITIVE` | |
| `MITIGATING_CONTROL` | |
| `NOT_APPLICABLE` | |
| `USED_IN_TESTS` | |
| `ACCEPTABLE_RISK` | The likelihood of the Vulnerability occurring and its impact are deemed acceptable |
| `FALSE_POSITIVE` | The Vulnerability was incorrectly identified as being present |
| `MITIGATING_CONTROL` | There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable |
| `NOT_APPLICABLE` | Other reasons for dismissal |
| `USED_IN_TESTS` | The Vulnerability is used in tests and does not pose an actual risk |
### VulnerabilityExternalIssueLinkExternalTracker
......
......@@ -6,8 +6,16 @@ module Types
graphql_name 'VulnerabilityDismissalReason'
description 'The dismissal reason of the Vulnerability'
DISMISSAL_DESCRIPTIONS = {
acceptable_risk: 'The likelihood of the Vulnerability occurring and its impact are deemed acceptable',
false_positive: 'The Vulnerability was incorrectly identified as being present',
mitigating_control: 'There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable',
used_in_tests: 'The Vulnerability is used in tests and does not pose an actual risk',
not_applicable: 'Other reasons for dismissal'
}.freeze
::Vulnerabilities::Feedback.dismissal_reasons.keys.each do |dismissal_reason|
value dismissal_reason.to_s.upcase, value: dismissal_reason.to_s
value dismissal_reason.to_s.upcase, value: dismissal_reason.to_s, description: DISMISSAL_DESCRIPTIONS[dismissal_reason.to_sym]
end
end
end
......
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