Class CvssUtil

java.lang.Object
org.owasp.dependencycheck.utils.CvssUtil

public final class CvssUtil extends Object
Utility class to create CVSS Objects.
Author:
Jeremy Long
  • Method Details

    • vectorToCvssV2

      public static io.github.jeremylong.openvulnerability.client.nvd.CvssV2 vectorToCvssV2(String vectorString, Double baseScore)
      Convert a CVSSv2 vector String into a CvssV3 Object.
      Parameters:
      vectorString - the vector string
      baseScore - the base score
      Returns:
      the CVSSv2 object
    • cvssV2ScoreToSeverity

      public static String cvssV2ScoreToSeverity(Double score)
      Determines the severity from the score.
      Parameters:
      score - the score
      Returns:
      the severity
    • cvssV3ScoreToSeverity

      public static io.github.jeremylong.openvulnerability.client.nvd.CvssV3Data.SeverityType cvssV3ScoreToSeverity(Double score)
      Determines the severity from the score.
      Parameters:
      score - the score
      Returns:
      the severity
    • vectorToCvssV3

      public static io.github.jeremylong.openvulnerability.client.nvd.CvssV3 vectorToCvssV3(String vectorString, Double baseScore)
      Convert a CVSSv3 vector String into a CvssV3 Object.
      Parameters:
      vectorString - the vector string
      baseScore - the base score
      Returns:
      the CVSSv3 object
    • cvssV4ScoreToSeverity

      public static io.github.jeremylong.openvulnerability.client.nvd.CvssV4Data.SeverityType cvssV4ScoreToSeverity(double baseScore)
    • vectorToCvssV4

      public static io.github.jeremylong.openvulnerability.client.nvd.CvssV4 vectorToCvssV4(String source, io.github.jeremylong.openvulnerability.client.nvd.CvssV4.Type type, Double baseScore, String vectorString)
      Convert a CVSSv4 vector String into a CvssV4 Object.
      Parameters:
      source - the source of the CVSS data
      type - the type of CVSS data (primary or secondary)
      baseScore - the base score
      vectorString - the vector string
      Returns:
      the CVSSv4 object