Class GHAdvisory

java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHAdvisory
All Implemented Interfaces:
HttpRequestInterface, JSONHelper

public class GHAdvisory extends GHBase
Represents a GitHub Security Advisory. This class provides methods and properties to access information about a security advisory on GitHub.
  • Constructor Details

    • GHAdvisory

      public GHAdvisory(Github github, org.json.JSONObject jsonObject)
      Constructs a new GHAdvisory instance with the provided JSON object.
      Parameters:
      jsonObject - the JSON object containing the advisory data
  • Method Details

    • getDescription

      public String getDescription()
      Returns the description of the advisory.
      Returns:
      the description of the advisory
    • getUrl

      public String getUrl()
      Returns the URL of the advisory.
      Returns:
      the URL of the advisory
    • getType

      public String getType()
      Returns the type of the advisory.
      Returns:
      the type of the advisory
    • getCwes

      public org.json.JSONArray getCwes()
      Returns the CWEs (Common Weakness Enumerations) of the advisory.
      Returns:
      the CWEs of the advisory
    • getId

      public int getId()
      Returns the ID of the advisory.
      Returns:
      the ID of the advisory
    • getCvss

      public org.json.JSONObject getCvss()
      Returns the CVSS (Common Vulnerability Scoring System) data of the advisory.
      Returns:
      the CVSS data of the advisory
    • getIdentifiers

      public List<org.json.JSONObject> getIdentifiers()
      Returns the identifiers of the advisory.
      Returns:
      the identifiers of the advisory
    • getPublishedAt

      public OffsetDateTime getPublishedAt()
      Returns the publication date and time of the advisory.
      Returns:
      the publication date and time of the advisory
    • getVulnerabilities

      public List<GHVulnerability> getVulnerabilities()
      Returns the vulnerabilities associated with the advisory.
      Returns:
      a list of GHVulnerability instances
    • getCredits

      public List<GHUser> getCredits()
      Returns the credits for the advisory.
      Returns:
      a list of GHUser instances representing the credits
    • getGithubReviewedAt

      public OffsetDateTime getGithubReviewedAt()
      Returns the GitHub review date and time of the advisory.
      Returns:
      the GitHub review date and time of the advisory
    • getNvdPublishedAt

      public OffsetDateTime getNvdPublishedAt()
      Returns the NVD (National Vulnerability Database) publication date and time of the advisory.
      Returns:
      the NVD publication date and time of the advisory
    • getUpdatedAt

      public OffsetDateTime getUpdatedAt()
      Returns the last updated date and time of the advisory.
      Returns:
      the last updated date and time of the advisory
    • getWithdrawnAt

      public OffsetDateTime getWithdrawnAt()
      Returns the withdrawal date and time of the advisory.
      Returns:
      the withdrawal date and time of the advisory
    • getCveId

      public String getCveId()
      Returns the CVE ID of the advisory.
      Returns:
      the CVE ID of the advisory
    • getGhsaId

      public String getGhsaId()
      Returns the GHSA ID of the advisory.
      Returns:
      the GHSA ID of the advisory
    • getHtmlUrl

      public String getHtmlUrl()
      Returns the HTML URL of the advisory.
      Returns:
      the HTML URL of the advisory
    • getRepositoryAdvisoryUrl

      public String getRepositoryAdvisoryUrl()
      Returns the repository advisory URL.
      Returns:
      the repository advisory URL
    • getSeverity

      public String getSeverity()
      Returns the severity of the advisory.
      Returns:
      the severity of the advisory
    • getSourceCodeLocation

      public String getSourceCodeLocation()
      Returns the source code location of the advisory.
      Returns:
      the source code location of the advisory
    • getSummary

      public String getSummary()
      Returns the summary of the advisory.
      Returns:
      the summary of the advisory
    • getReferences

      public List<String> getReferences()
      Returns the references of the advisory.
      Returns:
      the references of the advisory