Skip to main content

A package to convert CVSSv2 to CVSSv3

Project description

cvss-converter

A python program to convert older cvss versions to more modern ones. Currently cvss-converter only provides cvssv2 to cvssv3 conversion, with strict mode by default.

Strict Mode

As there are a several fields which are either ambiguous or doesn't exist at all (e.g. Scope or User Interaction). During conversion, the logic will always choose the values of a vector that yields a higher CVSS score. We prefer to err on the side of caution than to assume that the vulnerability is not affected by the ambiguity. The conversion mapping chart in strict mode for ambiguous or missing vectors is as follows:

CVSSv2 Vector CVSSv3.1 Vector
Attack Complexity (AC): "Medium" Attack Complexity (AC): "Low"
Does not exist Scope (S): "C"
Does not exist User Interaction (UI): "N"

Please also note that for Attack Vector (AV), since there is no Physical value in CVSSv2, there is no conversion requirements to ever map a value to CVSSv3 AV:P.

How to use?

Install with Pip or Pipenv

Pip:

pip install cvss-converter

Pipenv:

pipenv install cvss-converter

Usage: Example

from cvss_converter.converter import cvss2_to_cvss3

cvssv2 = "AV:N/AC:H/Au:S/C:P/I:P/A:C"
cvssv3, score = cvss2_to_cvss3(cvssv2)
print(f"CVSSv3 Vector: {cvssv3}, Base Score: {score}")

Expected output:

CVSSv3 Vector: CVSS:3.0/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:H, Base Score: 7.1

Future

  • Add vector override
  • Add option for standard mode (non-strict)

How to administrate Pypi (SECTA5 only)

https://secta5.atlassian.net/wiki/spaces/SE/pages/116162580/How+to+administrate+Pypi

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cvss_converter-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

cvss_converter-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file cvss_converter-0.1.2.tar.gz.

File metadata

  • Download URL: cvss_converter-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for cvss_converter-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2f79620b44c843059eb9b663b3c4a23515b9dd85ec1f58b7a42924bcfd1642a5
MD5 640a092c17a913ef81e038a3fda5c04b
BLAKE2b-256 86d76ecf01b946a4e51a9b32ee315090ae14ea615d6bd75323a657b30ec9004b

See more details on using hashes here.

File details

Details for the file cvss_converter-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cvss_converter-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f35b815ebcc9314282980850f306c60aeb29b788ef57785a2c8017fc49c4a8a
MD5 ac636ec21ac3c3a023f0c84f904a11b5
BLAKE2b-256 7f4d7b4609b283b50da494d20c213c4ffe110f5663602beb4abc306c7c952e8d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page