#!/usr/bin/env python
"""
Provides the CVSS supplemental metric Vulnerability Response Effort.
"""
#  Copyright (c) 2023-2025 Carnegie Mellon University.
#  NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE
#  ENGINEERING INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS.
#  CARNEGIE MELLON UNIVERSITY MAKES NO WARRANTIES OF ANY KIND,
#  EITHER EXPRESSED OR IMPLIED, AS TO ANY MATTER INCLUDING, BUT
#  NOT LIMITED TO, WARRANTY OF FITNESS FOR PURPOSE OR
#  MERCHANTABILITY, EXCLUSIVITY, OR RESULTS OBTAINED FROM USE
#  OF THE MATERIAL. CARNEGIE MELLON UNIVERSITY DOES NOT MAKE
#  ANY WARRANTY OF ANY KIND WITH RESPECT TO FREEDOM FROM
#  PATENT, TRADEMARK, OR COPYRIGHT INFRINGEMENT.
#  Licensed under a MIT (SEI)-style license, please see LICENSE or contact
#  permission@sei.cmu.edu for full terms.
#  [DISTRIBUTION STATEMENT A] This material has been approved for
#  public release and unlimited distribution. Please see Copyright notice
#  for non-US Government use and distribution.
#  This Software includes and/or makes use of Third-Party Software each
#  subject to its own license.
#  DM24-0278

from ssvc.decision_points.base import DecisionPointValue
from ssvc.decision_points.cvss._not_defined import NOT_DEFINED_X
from ssvc.decision_points.cvss.base import CvssDecisionPoint
from ssvc.decision_points.helpers import print_versions_and_diffs

LOW = DecisionPointValue(
    name="Low",
    key="L",
    definition="The effort required to respond to a vulnerability is low/trivial.",
)
MODERATE = DecisionPointValue(
    name="Moderate",
    key="M",
    definition="The actions required to respond to a vulnerability require some effort on behalf of the "
    "consumer and could cause minimal service impact to implement.",
)
HIGH = DecisionPointValue(
    name="High",
    key="H",
    definition="The actions required to respond to a vulnerability are significant and/or difficult, and may "
    "possibly lead to an extended, scheduled service impact. This would need to be considered for scheduling "
    "purposes including honoring any embargo on deployment of the selected response. Alternatively, response "
    "to the vulnerability in the field is not possible remotely. The only resolution to the vulnerability "
    "involves physical replacement (e.g. units deployed would have to be recalled for a depot level repair or "
    "replacement).",
)
VULNERABILITY_RESPONSE_EFFORT_1 = CvssDecisionPoint(
    name="Vulnerability Response Effort",
    definition="The intention of the Vulnerability Response Effort metric is to provide supplemental information on "
    "how difficult it is for consumers to provide an initial response to the impact of vulnerabilities for deployed "
    "products and services in their infrastructure. The consumer can then take this additional information on effort "
    "required into consideration when applying mitigations and/or scheduling remediation.",
    key="RE",
    version="1.0.0",
    values=(
        NOT_DEFINED_X,
        LOW,
        MODERATE,
        HIGH,
    ),
)

VERSIONS = (VULNERABILITY_RESPONSE_EFFORT_1,)
LATEST = VERSIONS[-1]


def main():
    print_versions_and_diffs(VERSIONS)


if __name__ == "__main__":
    main()
