Class NpmAuditParser

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

public class NpmAuditParser extends Object
Parser for NPM Audit API response. This parser is derived from: https://github.com/DependencyTrack/dependency-track/blob/master/src/main/java/org/owasp/dependencytrack/parser/npm/audit/NpmAuditParser.java
Author:
Steve Springett
  • Constructor Details

    • NpmAuditParser

      public NpmAuditParser()
  • Method Details

    • parse

      public List<Advisory> parse(org.json.JSONObject jsonResponse) throws org.json.JSONException
      Parses the JSON response from the NPM Audit API.
      Parameters:
      jsonResponse - the JSON node to parse
      Returns:
      an AdvisoryResults object
      Throws:
      org.json.JSONException - thrown if the JSON is not of the expected schema