Package edu.hm.hafner.analysis.parser
Class TrivyParser
- java.lang.Object
-
- edu.hm.hafner.analysis.IssueParser
-
- edu.hm.hafner.analysis.parser.JsonIssueParser
-
- edu.hm.hafner.analysis.parser.TrivyParser
-
- All Implemented Interfaces:
Serializable
public class TrivyParser extends JsonIssueParser
Parser for reports of aquasec trivy container vulnerability scanner.
Usage: trivy image -f json -o results.json golang:1.12-alpine
- Author:
- Thomas Fürer - tfuerer.javanet@gmail.com
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TrivyParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidparseJsonArray(Report report, org.json.JSONArray jsonReport, IssueBuilder issueBuilder)Used with older schema before trivy 0.20.0.protected voidparseJsonObject(Report report, org.json.JSONObject jsonReport, IssueBuilder issueBuilder)Used with schema version 2 starting with trivy 0.20.0.-
Methods inherited from class edu.hm.hafner.analysis.parser.JsonIssueParser
accepts, parse
-
Methods inherited from class edu.hm.hafner.analysis.IssueParser
equalsIgnoreCase, isXmlFile, parseFile
-
-
-
-
Method Detail
-
parseJsonObject
protected void parseJsonObject(Report report, org.json.JSONObject jsonReport, IssueBuilder issueBuilder)
Used with schema version 2 starting with trivy 0.20.0.- Overrides:
parseJsonObjectin classJsonIssueParser- Parameters:
report- the report to filljsonReport- the input JSON report given as JSON objectissueBuilder- build to be used to create issues
-
parseJsonArray
protected void parseJsonArray(Report report, org.json.JSONArray jsonReport, IssueBuilder issueBuilder)
Used with older schema before trivy 0.20.0.- Overrides:
parseJsonArrayin classJsonIssueParser- Parameters:
report- the report to filljsonReport- the input JSON report given as JSON arrayissueBuilder- build to be used to create issues
-
-