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 { ...@@ -26061,10 +26061,29 @@ type VulnerabilityDismissPayload {
The dismissal reason of the Vulnerability The dismissal reason of the Vulnerability
""" """
enum VulnerabilityDismissalReason { enum VulnerabilityDismissalReason {
"""
The likelihood of the Vulnerability occurring and its impact are deemed acceptable
"""
ACCEPTABLE_RISK ACCEPTABLE_RISK
"""
The Vulnerability was incorrectly identified as being present
"""
FALSE_POSITIVE FALSE_POSITIVE
"""
There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable
"""
MITIGATING_CONTROL MITIGATING_CONTROL
"""
Other reasons for dismissal
"""
NOT_APPLICABLE NOT_APPLICABLE
"""
The Vulnerability is used in tests and does not pose an actual risk
"""
USED_IN_TESTS USED_IN_TESTS
} }
......
...@@ -75560,31 +75560,31 @@ ...@@ -75560,31 +75560,31 @@
"enumValues": [ "enumValues": [
{ {
"name": "ACCEPTABLE_RISK", "name": "ACCEPTABLE_RISK",
"description": null, "description": "The likelihood of the Vulnerability occurring and its impact are deemed acceptable",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "FALSE_POSITIVE", "name": "FALSE_POSITIVE",
"description": null, "description": "The Vulnerability was incorrectly identified as being present",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "MITIGATING_CONTROL", "name": "MITIGATING_CONTROL",
"description": null, "description": "There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "USED_IN_TESTS", "name": "USED_IN_TESTS",
"description": null, "description": "The Vulnerability is used in tests and does not pose an actual risk",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
}, },
{ {
"name": "NOT_APPLICABLE", "name": "NOT_APPLICABLE",
"description": null, "description": "Other reasons for dismissal",
"isDeprecated": false, "isDeprecated": false,
"deprecationReason": null "deprecationReason": null
} }
...@@ -4945,11 +4945,11 @@ The dismissal reason of the Vulnerability. ...@@ -4945,11 +4945,11 @@ The dismissal reason of the Vulnerability.
| Value | Description | | Value | Description |
| ----- | ----------- | | ----- | ----------- |
| `ACCEPTABLE_RISK` | | | `ACCEPTABLE_RISK` | The likelihood of the Vulnerability occurring and its impact are deemed acceptable |
| `FALSE_POSITIVE` | | | `FALSE_POSITIVE` | The Vulnerability was incorrectly identified as being present |
| `MITIGATING_CONTROL` | | | `MITIGATING_CONTROL` | There is a mitigating control that eliminates the Vulnerability or makes its risk acceptable |
| `NOT_APPLICABLE` | | | `NOT_APPLICABLE` | Other reasons for dismissal |
| `USED_IN_TESTS` | | | `USED_IN_TESTS` | The Vulnerability is used in tests and does not pose an actual risk |
### VulnerabilityExternalIssueLinkExternalTracker ### VulnerabilityExternalIssueLinkExternalTracker
......
...@@ -6,8 +6,16 @@ module Types ...@@ -6,8 +6,16 @@ module Types
graphql_name 'VulnerabilityDismissalReason' graphql_name 'VulnerabilityDismissalReason'
description 'The dismissal reason of the Vulnerability' 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| ::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 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