mirror of
https://github.com/NationalSecurityAgency/ghidra
synced 2024-09-13 21:56:19 +00:00
GP-4510: fix for NPEs
This commit is contained in:
parent
80bae5242c
commit
b6075d08ef
|
@ -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() {
|
||||
if (result.getKind() != null) {
|
||||
return result.getKind().toString();
|
||||
}
|
||||
return "none";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,10 @@ public class SarifLevelResultHandler extends SarifResultHandler {
|
|||
}
|
||||
|
||||
public String parse() {
|
||||
if (result.getLevel() != null) {
|
||||
return result.getLevel().toString();
|
||||
}
|
||||
return "none";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue