Class CvssUtil


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String cvssV2ScoreToSeverity​(java.lang.Double score)
      Determines the severity from the score.
      static io.github.jeremylong.openvulnerability.client.nvd.CvssV3Data.SeverityType cvssV3ScoreToSeverity​(java.lang.Double score)
      Determines the severity from the score.
      static io.github.jeremylong.openvulnerability.client.nvd.CvssV2 vectorToCvssV2​(java.lang.String vectorString, java.lang.Double baseScore)
      Convert a CVSSv2 vector String into a CvssV3 Object.
      static io.github.jeremylong.openvulnerability.client.nvd.CvssV3 vectorToCvssV3​(java.lang.String vectorString, java.lang.Double baseScore)
      Convert a CVSSv3 vector String into a CvssV3 Object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • vectorToCvssV2

        public static io.github.jeremylong.openvulnerability.client.nvd.CvssV2 vectorToCvssV2​(java.lang.String vectorString,
                                                                                              java.lang.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 java.lang.String cvssV2ScoreToSeverity​(java.lang.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​(java.lang.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​(java.lang.String vectorString,
                                                                                              java.lang.Double baseScore)
        Convert a CVSSv3 vector String into a CvssV3 Object.
        Parameters:
        vectorString - the vector string
        baseScore - the base score
        Returns:
        the CVSSv3 object