In [1]: from cvss import CVSS3
In [2]: from cvss.exceptions import CVSS3MalformedError
In [3]: vector = 'CVSS:3.0//AC:H/PR:H/UI:R/S:U/C:L/I:N/A:L'
In [4]: try:
...: cvss = CVSS3(vector)
...: except CVSS3MalformedError as e:
...: print(e)
...:
Malformed CVSS3 field ""
The vector is missing the AV value but the error message is not very helpful in this case since it shows an empty string. Perhaps default to showing the whole string in case of an empty string.
The vector is missing the
AV
value but the error message is not very helpful in this case since it shows an empty string. Perhaps default to showing the whole string in case of an empty string.