Skip to content

Commit

Permalink
Update README and setup.py to reflect CVSS4 (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
jobselko authored Jan 24, 2024
1 parent c637e63 commit 807eaf8
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
18 changes: 15 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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'
Expand All @@ -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:

::
Expand All @@ -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
~~~~~~~~~~~~~~~~~~~~~~

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down

0 comments on commit 807eaf8

Please sign in to comment.