Class GHAdvisory
java.lang.Object
io.github.coho04.githubapi.bases.GHBase
io.github.coho04.githubapi.entities.GHAdvisory
- All Implemented Interfaces:
HttpRequestInterface
,JSONHelper
Represents a GitHub Security Advisory.
This class provides methods and properties to access information about a security advisory on GitHub.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
JSONHelper.JSONToObject<T>
-
Constructor Summary
ConstructorsConstructorDescriptionGHAdvisory
(Github github, org.json.JSONObject jsonObject) Constructs a new GHAdvisory instance with the provided JSON object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the credits for the advisory.getCveId()
Returns the CVE ID of the advisory.org.json.JSONObject
getCvss()
Returns the CVSS (Common Vulnerability Scoring System) data of the advisory.org.json.JSONArray
getCwes()
Returns the CWEs (Common Weakness Enumerations) of the advisory.Returns the description of the advisory.Returns the GHSA ID of the advisory.Returns the GitHub review date and time of the advisory.Returns the HTML URL of the advisory.int
getId()
Returns the ID of the advisory.List
<org.json.JSONObject> Returns the identifiers of the advisory.Returns the NVD (National Vulnerability Database) publication date and time of the advisory.Returns the publication date and time of the advisory.Returns the references of the advisory.Returns the repository advisory URL.Returns the severity of the advisory.Returns the source code location of the advisory.Returns the summary of the advisory.getType()
Returns the type of the advisory.Returns the last updated date and time of the advisory.getUrl()
Returns the URL of the advisory.Returns the vulnerabilities associated with the advisory.Returns the withdrawal date and time of the advisory.Methods inherited from class io.github.coho04.githubapi.bases.GHBase
fetchArrayData, fetchArrayData, fetchPaginatedData, fetchPaginatedData, fetchPaginatedData, getBaseUrl, toJSONObject
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.coho04.githubapi.interfaces.HttpRequestInterface
extractNextPageUrl, sendDeleteRequest, sendDeleteRequestWithResponseCode, sendGetRequest, sendGetRequestWithLinkHeader, sendGetRequestWithResponseCode, sendPatchRequest, sendPostRequest, sendPutRequest
Methods inherited from interface io.github.coho04.githubapi.interfaces.JSONHelper
getArrayOrNull, getBooleanOrNull, getIntOrNull, getJSONArrayToStringList, getJSONObjectOrNull, getLocalDateOrNull, getLongOrNull, getStringOrNull
-
Constructor Details
-
GHAdvisory
Constructs a new GHAdvisory instance with the provided JSON object.- Parameters:
jsonObject
- the JSON object containing the advisory data
-
-
Method Details
-
getDescription
Returns the description of the advisory.- Returns:
- the description of the advisory
-
getUrl
Returns the URL of the advisory.- Returns:
- the URL of the advisory
-
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
Returns the identifiers of the advisory.- Returns:
- the identifiers of the advisory
-
getPublishedAt
Returns the publication date and time of the advisory.- Returns:
- the publication date and time of the advisory
-
getVulnerabilities
Returns the vulnerabilities associated with the advisory.- Returns:
- a list of GHVulnerability instances
-
getCredits
Returns the credits for the advisory.- Returns:
- a list of GHUser instances representing the credits
-
getGithubReviewedAt
Returns the GitHub review date and time of the advisory.- Returns:
- the GitHub review date and time of the advisory
-
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
Returns the last updated date and time of the advisory.- Returns:
- the last updated date and time of the advisory
-
getWithdrawnAt
Returns the withdrawal date and time of the advisory.- Returns:
- the withdrawal date and time of the advisory
-
getCveId
Returns the CVE ID of the advisory.- Returns:
- the CVE ID of the advisory
-
getGhsaId
Returns the GHSA ID of the advisory.- Returns:
- the GHSA ID of the advisory
-
getHtmlUrl
Returns the HTML URL of the advisory.- Returns:
- the HTML URL of the advisory
-
getRepositoryAdvisoryUrl
Returns the repository advisory URL.- Returns:
- the repository advisory URL
-
getSeverity
Returns the severity of the advisory.- Returns:
- the severity of the advisory
-
getSourceCodeLocation
Returns the source code location of the advisory.- Returns:
- the source code location of the advisory
-
getSummary
Returns the summary of the advisory.- Returns:
- the summary of the advisory
-
getReferences
Returns the references of the advisory.- Returns:
- the references of the advisory
-