Merge remote-tracking branch 'origin/GP-4510_d-millar_SARIF_NPEs'

This commit is contained in:
Ryan Kurtz
2024-04-12 13:48:37 -04:00
4 changed files with 11 additions and 5 deletions

View File

@@ -59,7 +59,7 @@ import sarif.io.SarifIO;
packageName = MiscellaneousPluginPackage.NAME,
category = PluginCategoryNames.ANALYSIS,
shortDescription = "Sarif Plugin.",
description = "From sarif parsing to DL modelling"
description = "SARIF parsing and visualization plugin."
)
//@formatter:on

View File

@@ -41,8 +41,8 @@ public class SarifObject implements IsfObject {
if (SARIF) {
message = new JsonObject();
message.addProperty("text", key);
kind = "INFORMATIONAL";
level = "NONE";
kind = "informational"; // convention specifies lower-case
level = "none";
ruleId = ruleKey;
properties = new JsonObject();
properties.add("additionalProperties", element);

View File

@@ -24,7 +24,10 @@ public class SarifKindResultHandler extends SarifResultHandler {
}
public String parse() {
return result.getKind().toString();
if (result.getKind() != null) {
return result.getKind().toString();
}
return "none";
}
}

View File

@@ -24,7 +24,10 @@ public class SarifLevelResultHandler extends SarifResultHandler {
}
public String parse() {
return result.getLevel().toString();
if (result.getLevel() != null) {
return result.getLevel().toString();
}
return "none";
}
}