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

@NullMarked public class CveItem extends Object implements Serializable
Represents a CVE item from the NVD API containing vulnerability details.
See Also:
  • Field Details

    • serialVersionUID

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

      private String id
      (Required)
    • sourceIdentifier

      private @Nullable String sourceIdentifier
    • vulnStatus

      private @Nullable String vulnStatus
    • published

      private ZonedDateTime published
      (Required)
    • lastModified

      private ZonedDateTime lastModified
      (Required)
    • evaluatorComment

      private @Nullable String evaluatorComment
    • evaluatorSolution

      private @Nullable String evaluatorSolution
    • evaluatorImpact

      private @Nullable String evaluatorImpact
    • cisaExploitAdd

      private @Nullable LocalDate cisaExploitAdd
    • cisaActionDue

      private @Nullable LocalDate cisaActionDue
    • cisaRequiredAction

      private @Nullable String cisaRequiredAction
    • cisaVulnerabilityName

      private @Nullable String cisaVulnerabilityName
    • cveTags

      private @Nullable List<CveTag> cveTags
    • descriptions

      private List<LangString> descriptions
      (Required)
    • references

      private List<Reference> references
      (Required)
    • metrics

      @JsonPropertyDescription("Metric scores for a vulnerability as found on NVD.") private @Nullable Metrics metrics
      Metric scores for a vulnerability as found on NVD.
    • weaknesses

      private @Nullable List<Weakness> weaknesses
    • configurations

      private @Nullable List<Config> configurations
    • vendorComments

      private @Nullable List<VendorComment> vendorComments
  • Constructor Details

    • CveItem

      public CveItem(String id, ZonedDateTime published, ZonedDateTime lastModified, List<LangString> descriptions, List<Reference> references)
      Constructor taking only the required set of JSON properties as the minimal constructor for a CveItem.
      Parameters:
      id - The id of the cveItem data from the NVD API (required JSON property)
      published - The published of the cveItem data from the NVD API (required JSON property)
      lastModified - The lastModified of the cveItem data from the NVD API (required JSON property)
      descriptions - The descriptions of the cveItem data from the NVD API (required JSON property)
      references - The references of the cveItem data from the NVD API (required JSON property)
    • CveItem

      public CveItem(String id, @Nullable String sourceIdentifier, @Nullable String vulnStatus, ZonedDateTime published, ZonedDateTime lastModified, @Nullable String evaluatorComment, @Nullable String evaluatorSolution, @Nullable String evaluatorImpact, @Nullable LocalDate cisaExploitAdd, @Nullable LocalDate cisaActionDue, @Nullable String cisaRequiredAction, @Nullable String cisaVulnerabilityName, @Nullable List<CveTag> cveTags, List<LangString> descriptions, List<Reference> references, @Nullable Metrics metrics, @Nullable List<Weakness> weaknesses, @Nullable List<Config> configurations, @Nullable List<VendorComment> vendorComments)
      Full constructor for CveItem.
      Parameters:
      id - the CVE identifier
      sourceIdentifier - the source identifier
      vulnStatus - the vulnerability status
      published - the publication date
      lastModified - the last modified date
      evaluatorComment - evaluator comment
      evaluatorSolution - evaluator solution
      evaluatorImpact - evaluator impact assessment
      cisaExploitAdd - date added to CISA KEV catalog
      cisaActionDue - CISA required action due date
      cisaRequiredAction - CISA required action
      cisaVulnerabilityName - CISA vulnerability name
      cveTags - CVE tags
      descriptions - vulnerability descriptions
      references - vulnerability references
      metrics - CVSS metrics
      weaknesses - CWE weaknesses
      configurations - affected configurations
      vendorComments - vendor comments
  • Method Details

    • getId

      public String getId()
      Returns:
      id
    • getSourceIdentifier

      public @Nullable String getSourceIdentifier()
      Returns:
      sourceIdentifier
    • getVulnStatus

      public @Nullable String getVulnStatus()
      Returns:
      vulnStatus
    • getPublished

      public ZonedDateTime getPublished()
      Returns:
      published
    • getLastModified

      public ZonedDateTime getLastModified()
      Returns:
      lastModified
    • getEvaluatorComment

      public @Nullable String getEvaluatorComment()
      Returns:
      evaluatorComment
    • getEvaluatorSolution

      public @Nullable String getEvaluatorSolution()
      Returns:
      evaluatorSolution
    • getEvaluatorImpact

      public @Nullable String getEvaluatorImpact()
      Returns:
      evaluatorImpact
    • getCisaExploitAdd

      public @Nullable LocalDate getCisaExploitAdd()
      Returns:
      cisaExploitAdd
    • getCisaActionDue

      public @Nullable LocalDate getCisaActionDue()
      Returns:
      cisaActionDue
    • getCisaRequiredAction

      public @Nullable String getCisaRequiredAction()
      Returns:
      cisaRequiredAction
    • getCisaVulnerabilityName

      public @Nullable String getCisaVulnerabilityName()
      Returns:
      cisaVulnerabilityName
    • getCveTags

      public @Nullable List<CveTag> getCveTags()
      Returns:
      cveTags
    • getDescriptions

      public List<LangString> getDescriptions()
      (Required)
      Returns:
      descriptions
    • getReferences

      public List<Reference> getReferences()
      (Required)
      Returns:
      references
    • getMetrics

      public @Nullable Metrics getMetrics()
      Metric scores for a vulnerability as found on NVD.
      Returns:
      metrics
    • getWeaknesses

      public @Nullable List<Weakness> getWeaknesses()
      Returns:
      weaknesses
    • getConfigurations

      public @Nullable List<Config> getConfigurations()
      Returns:
      configurations
    • getVendorComments

      public @Nullable List<VendorComment> getVendorComments()
      Returns:
      vendorComments
    • 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