Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Allow getting score of CVSS 4.0 vectors #814

Merged
merged 6 commits into from
May 14, 2024
Merged

Conversation

timopollmeier
Copy link
Member

What

The function get_cvss_score_from_base_metrics can now also calculate the score of CVSS 4.0 vectors.

Why

To be able to use CVSS 4.0 in VTs.

References

GEA-529

Checklist

  • Tests

The function get_cvss_score_from_base_metrics can now also calculate
the score of CVSS 4.0 vectors.
@timopollmeier timopollmeier requested a review from a team as a code owner April 29, 2024 13:41
These should never occur but this ensures the values are always
set, so variables are initialized.
The max_vectors should never be empty, so an invalid value is assigned
just for safety.
@a-h-abdelsalam a-h-abdelsalam self-requested a review May 8, 2024 14:13
Copy link
Contributor

@a-h-abdelsalam a-h-abdelsalam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to update the header of the file cvss.c to include a section for CVSS v4.0 with links to the specification similar to what exists for other CVSS versions.

base/cvss.c Outdated Show resolved Hide resolved
base/cvss.c Show resolved Hide resolved
base/cvss.c Show resolved Hide resolved
base/cvss.c Show resolved Hide resolved
base/cvss.c Outdated Show resolved Hide resolved
base/cvss.c Outdated Show resolved Hide resolved
A typo has been fixed and some missing frees, error handling cases
and comments have been added.
@a-h-abdelsalam
Copy link
Contributor

There is a code format error that is causing the build CI check to fail. You may need to run: clang-format -i -style=file {base,boreas,gmp,osp,util}/*.{c,h}

base/cvss.c Show resolved Hide resolved
base/cvss.c Show resolved Hide resolved
@a-h-abdelsalam a-h-abdelsalam merged commit 3562754 into main May 14, 2024
10 checks passed
@a-h-abdelsalam a-h-abdelsalam deleted the add-cvss4 branch May 14, 2024 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants