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

Fix calculation of CVSSv3.1 environmental scores #89

Merged
merged 1 commit into from
May 23, 2024

Commits on May 22, 2024

  1. Fix calculation of CVSSv3.1 environmental scores

    * Fixed environmental score calculation by using base score values if the environmental score values are null or NOT_DEFINED ("X") -> otherwise the environmental score is zero if not all fields are set
    * Adds check for negative values in `CvssV3#roundNearestTenth`
    
    Extracted from stevespringett#17
    
    Aligns `CvssV3_1#calculateScore` with the calculator from first.org (https://www.first.org/cvss/calculator/cvsscalc31.js).
    
    Aside from fixing the score calculation, it also streamlines the calculation logic by removing unnecessary nesting.
    
    Co-authored-by: Michael Hinterdorfer <[email protected]>
    nscuro and michael-hinterdorfer committed May 22, 2024
    Configuration menu
    Copy the full SHA
    9b7c6a8 View commit details
    Browse the repository at this point in the history