mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-25 17:00:36 -09:00
Merge remote-tracking branch 'origin/GP-4510_d-millar_SARIF_NPEs'
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user