java.lang.Object
edu.hm.hafner.analysis.IssueParser
edu.hm.hafner.analysis.parser.JsonIssueParser
edu.hm.hafner.analysis.parser.TrivyParser
- All Implemented Interfaces:
Serializable
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:
-
Field Summary
Fields inherited from class edu.hm.hafner.analysis.IssueParser
ADDITIONAL_PROPERTIES, CATEGORY, COLUMN_END, COLUMN_START, DESCRIPTION, FILE_NAME, FINGERPRINT, ID, LINE_END, LINE_RANGE_END, LINE_RANGE_START, LINE_RANGES, LINE_START, MESSAGE, MODULE_NAME, ORIGIN, PACKAGE_NAME, SEVERITY, TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, parseMethods inherited from class edu.hm.hafner.analysis.IssueParser
equalsIgnoreCase, isXmlFile, parseFile
-
Constructor Details
-
TrivyParser
public TrivyParser()
-
-
Method Details
-
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
-