Class NodeAuditSearch

java.lang.Object
org.owasp.dependencycheck.data.nodeaudit.NodeAuditSearch

@ThreadSafe public class NodeAuditSearch extends Object
Class of methods to search via Node Audit API.
Author:
Steve Springett
  • Constructor Details

    • NodeAuditSearch

      public NodeAuditSearch(Settings settings) throws MalformedURLException
      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 package
      IOException - if it's unable to connect to Node Audit API