From 807eaf86968f394153ab6d2c25334df4c42c1fa4 Mon Sep 17 00:00:00 2001 From: Jitka Obselkova <41325380+jobselko@users.noreply.github.com> Date: Wed, 24 Jan 2024 09:55:47 +0100 Subject: [PATCH] Update README and setup.py to reflect CVSS4 (#51) --- README.rst | 18 +++++++++++++++--- setup.py | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 7b6eb30..6fed1ea 100644 --- a/README.rst +++ b/README.rst @@ -1,8 +1,8 @@ CVSS ==== -This Python package contains CVSS v2 and v3 computation utilities and -interactive calculator compatible with both Python 2 and Python 3. +This Python package contains CVSS v2, v3 and v4 computation utilities and +interactive calculator (for v2 and v3 only) compatible with both Python 2 and Python 3. The library is tested on all currently-supported Python versions available via GitHub Actions (with the exception of Python 2.7, which is EOL but @@ -23,7 +23,7 @@ Library .. code-block:: python - from cvss import CVSS2, CVSS3 + from cvss import CVSS2, CVSS3, CVSS4 vector = 'AV:L/AC:L/Au:M/C:N/I:P/A:C/E:U/RL:W/RC:ND/CDP:L/TD:H/CR:ND/IR:ND/AR:M' @@ -41,6 +41,14 @@ Library print(c.scores()) print(c.severities()) + print() + + vector = 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N' + c = CVSS4(vector) + print(vector) + print(c.base_score) + print(c.severity) + Sample output: :: @@ -54,6 +62,10 @@ Sample output: (6.5, 6.0, 5.3) ('Medium', 'Medium', 'Medium') + CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:N + 9.9 + Critical + Interactive calculator ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/setup.py b/setup.py index 44bf37c..9bde2bf 100644 --- a/setup.py +++ b/setup.py @@ -27,7 +27,7 @@ setup( name="cvss", version=version, - description="CVSS2/3 library with interactive calculator for Python 2 and Python 3", + description="CVSS2/3/4 library with interactive calculator for Python 2 and Python 3", long_description=long_description, url="https://github.com/RedHatProductSecurity/cvss", project_urls={