-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CVSS Qualitative Severity Rating Scale decision point (#712)
* add CVSS qualitative severity as a decision point * make json in `example_block()` optional * markdownlint * add qualitative severity link to cvss/index.md
- Loading branch information
1 parent
3fd228b
commit 9b53f52
Showing
5 changed files
with
101 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
docs/reference/decision_points/cvss/qualitative_severity.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# CVSS Qualitative Severity Rating Scale | ||
|
||
```python exec="true" idprefix="" | ||
from ssvc.decision_points.cvss.qualitative_severity import LATEST | ||
from ssvc.doc_helpers import example_block | ||
|
||
print(example_block(LATEST)) | ||
``` | ||
|
||
The [CVSS Qualitative Severity Rating Scale](https://www.first.org/cvss/v4.0/specification-document#Qualitative-Severity-Rating-Scale) | ||
is a set of labels that describe the severity of a vulnerability based on the | ||
CVSS Score. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
#!/usr/bin/env python | ||
""" | ||
Provides a decision point for the [CVSS Qualitative Severity Rating Scale](https://www.first.org/cvss/v4.0/specification-document#Qualitative-Severity-Rating-Scale). | ||
""" | ||
# Copyright (c) 2025 Carnegie Mellon University and Contributors. | ||
# - see Contributors.md for a full list of Contributors | ||
# - see ContributionInstructions.md for information on how you can Contribute to this project | ||
# Stakeholder Specific Vulnerability Categorization (SSVC) is | ||
# licensed under a MIT (SEI)-style license, please see LICENSE.md distributed | ||
# with this Software or contact [email protected] for full terms. | ||
# Created, in part, with funding and support from the United States Government | ||
# (see Acknowledgments file). This program may include and/or can make use of | ||
# certain third party source code, object code, documentation and other files | ||
# (“Third Party Software”). See LICENSE.md for more details. | ||
# Carnegie Mellon®, CERT® and CERT Coordination Center® are registered in the | ||
# U.S. Patent and Trademark Office by Carnegie Mellon University | ||
|
||
from ssvc.decision_points import SsvcDecisionPointValue | ||
from ssvc.decision_points.cvss.base import CvssDecisionPoint | ||
from ssvc.decision_points.helpers import print_versions_and_diffs | ||
|
||
QS_NONE = SsvcDecisionPointValue( | ||
name="None", | ||
key="N", | ||
description="No severity rating (0.0)", | ||
) | ||
|
||
LOW = SsvcDecisionPointValue( | ||
name="Low", | ||
key="L", | ||
description="Low (0.1 - 3.9)", | ||
) | ||
MEDIUM = SsvcDecisionPointValue( | ||
name="Medium", | ||
key="M", | ||
description="Medium (4.0 - 6.9)", | ||
) | ||
HIGH = SsvcDecisionPointValue( | ||
name="High", | ||
key="H", | ||
description="High (7.0 - 8.9)", | ||
) | ||
CRITICAL = SsvcDecisionPointValue( | ||
name="Critical", | ||
key="C", | ||
description="Critical (9.0 - 10.0)", | ||
) | ||
|
||
QUALITATIVE_SEVERITY = CvssDecisionPoint( | ||
name="CVSS Qualitative Severity Rating Scale", | ||
key="QS", | ||
description="The CVSS Qualitative Severity Rating Scale provides " | ||
"a categorical representation of a CVSS Score.", | ||
version="1.0.0", | ||
values=( | ||
QS_NONE, | ||
LOW, | ||
MEDIUM, | ||
HIGH, | ||
CRITICAL, | ||
), | ||
) | ||
|
||
VERSIONS = (QUALITATIVE_SEVERITY,) | ||
LATEST = VERSIONS[-1] | ||
|
||
|
||
def main(): | ||
print_versions_and_diffs(VERSIONS) | ||
|
||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters