Skip to content

Check the real unknown attributes when applying vector #181

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

Conversation

xaldama
Copy link

@xaldama xaldama commented Dec 17, 2024

When trying to get the vector from a vector string using CvssVector.parseVector, the method tries to infer the CVSS version from the attributes.
parseVectorOnlyIfKnownAttributes call to applyVector method, which returns the number of attributes applied, but it is expecting to get the unknown ones.
This PR checks if there is any attribute that was not applied to the vector.

I splited applyVector not to duplicate code.

@YanWittmann
Copy link
Contributor

I will check it out on friday!

Separated detection for CVSS:3.0 and CVSS:3.1.
@YanWittmann
Copy link
Contributor

I added a few test cases just to ensure everything is still working, but it looks fine. If everything still looks good to you @xaldama, I'd be happy to merge it!

@karsten-klein
Copy link
Contributor

@xaldama: Thank you very much for your contribution. While this time the changes are not tremendous, we nevertheless need a signed CLA from you before we can accept and merge the changes. Would you mind sending us a signed copy of the rendered content in CLA.md. We need this agreement from everybody committing outside of our organization.

YanWittmann added a commit that referenced this pull request May 15, 2025
Signed-off-by: Yan Wittmann <mail@yanwittmann.de>
@YanWittmann
Copy link
Contributor

Implemented changes into #251 using the latest core version as ref.

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.

3 participants