Fix CVSS4 clean vector field ordering - Threat and Environmental metrics generate invalid vectors #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix CVSS4 vectors generated by this module to follow the ordering from the specifications[1]. Before this change all vectors with Threat and Environmental metrics would be invalid and rejected by other CVSS tools[2].
[1] https://www.first.org/cvss/v4-0/specification-document#Vector-String
[2] https://redhatproductsecurity.github.io/cvss-v4-calculator/
This is related to #66 but does not add input validation because the doc strings explicitly mention that fields may be out of order. I've updated the ordering of the other metrics lists in sync with the specification too.