Package org.spdx.spdx_to_osv
Class OsvApi
java.lang.Object
org.spdx.spdx_to_osv.OsvApi
public class OsvApi extends Object
Singleton class for the OSV REST API
- Author:
- Gary O'Neall
-
Field Summary
Fields Modifier and Type Field Description protected static StringAPI_URL_STRINGprotected URLapiUrl -
Method Summary
Modifier and Type Method Description static OsvApigetInstance()List<OsvVulnerability>queryVulnerabilities(OsvVulnerabilityRequest packageNameVersion)Calls the QueryVulnerabilities API to obtain vulnerability information from OSV
-
Field Details
-
Method Details
-
getInstance
-
queryVulnerabilities
public List<OsvVulnerability> queryVulnerabilities(OsvVulnerabilityRequest packageNameVersion) throws IOException, SpdxToOsvExceptionCalls the QueryVulnerabilities API to obtain vulnerability information from OSV- Parameters:
packageNameVersion- The package name and version object to pass to the OSV API- Returns:
- collection of OSV Vulnerabilities returned by the API
- Throws:
IOExceptionSpdxToOsvException
-