java.lang.Object
io.github.jeremylong.openvulnerability.client.nvd.CvssV3
All Implemented Interfaces:
Serializable

@NullMarked public class CvssV3 extends Object implements Serializable
Represents CVSS version 3.0 scoring data from the NVD API.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serialization version UID.
      See Also:
    • source

      private String source
      (Required)
    • type

      private CvssV3.Type type
      (Required)
    • cvssData

      private CvssV3Data cvssData
      JSON Schema for Common Vulnerability Scoring System version 3.0

      (Required)

    • exploitabilityScore

      @JsonPropertyDescription("CVSS subscore.") private @Nullable Double exploitabilityScore
      CVSS subscore.
    • impactScore

      @JsonPropertyDescription("CVSS subscore.") private @Nullable Double impactScore
      CVSS subscore.
  • Constructor Details

    • CvssV3

      public CvssV3(String source, CvssV3.Type type, CvssV3Data cvssData)
      Constructor taking only the required set of JSON properties as the minimal constructor for a CvssV3.
      Parameters:
      source - The source for the CvssV3 (required JSON property)
      type - The type for the CvssV3 (required JSON property)
      cvssData - The cvssData for the CvssV3 (required JSON property)
    • CvssV3

      public CvssV3(String source, CvssV3.Type type, CvssV3Data cvssData, @Nullable Double exploitabilityScore, @Nullable Double impactScore)
      Full constructor for CvssV3.
      Parameters:
      source - the source of the CVSS score
      type - the type (Primary or Secondary)
      cvssData - the CVSS v3 data
      exploitabilityScore - the exploitability subscore
      impactScore - the impact subscore
  • Method Details

    • getSource

      public String getSource()
      (Required)
      Returns:
      source
    • getType

      public CvssV3.Type getType()
      (Required)
      Returns:
      type
    • getCvssData

      public CvssV3Data getCvssData()
      JSON Schema for Common Vulnerability Scoring System version 3.0

      (Required)

      Returns:
      cvssData
    • getExploitabilityScore

      public @Nullable Double getExploitabilityScore()
      CVSS subscore.
      Returns:
      exploitabilityScore
    • getImpactScore

      public @Nullable Double getImpactScore()
      CVSS subscore.
      Returns:
      impactScore
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object