use of com.mercedesbenz.sechub.sarif.model.Run in project sechub by mercedes-benz.
the class SarifV1JSONImporter method importResult.
public SerecoMetaData importResult(String data) throws IOException {
if (data == null) {
data = "";
}
Report report = null;
try {
report = sarifSupport.loadReport(data);
} catch (Exception e) {
/*
* here we can throw the exception - should never happen, because with
* #isAbleToImportForProduct we already check this is possible. So there is
* something odd here and we throw the exception
*/
throw new IOException("Import cannot parse sarif json", e);
}
SerecoMetaData metaData = new SerecoMetaData();
for (Run run : report.getRuns()) {
handleEachRun(run, metaData);
}
return metaData;
}
Aggregations