Class NodeAuditSearch
java.lang.Object
org.owasp.dependencycheck.data.nodeaudit.NodeAuditSearch
Class of methods to search via Node Audit API.
- Author:
- Steve Springett
-
Constructor Summary
ConstructorsConstructorDescriptionNodeAuditSearch(Settings settings) Creates a NodeAuditSearch for the given repository URL. -
Method Summary
Modifier and TypeMethodDescriptionsubmitPackage(jakarta.json.JsonObject packageJson) Submits the package.json file to the Node Audit API and returns a list of zero or more Advisories.
-
Constructor Details
-
NodeAuditSearch
Creates a NodeAuditSearch for the given repository URL.- Parameters:
settings- the configured settings- Throws:
MalformedURLException- thrown if the configured URL is invalid
-
-
Method Details
-
submitPackage
public List<Advisory> submitPackage(jakarta.json.JsonObject packageJson) throws SearchException, IOException Submits the package.json file to the Node Audit API and returns a list of zero or more Advisories.- Parameters:
packageJson- the package.json file retrieved from the Dependency- Returns:
- a List of zero or more Advisory object
- Throws:
SearchException- if Node Audit API is unable to analyze the packageIOException- if it's unable to connect to Node Audit API
-