mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-09-28 17:11:11 -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,
|
packageName = MiscellaneousPluginPackage.NAME,
|
||||||
category = PluginCategoryNames.ANALYSIS,
|
category = PluginCategoryNames.ANALYSIS,
|
||||||
shortDescription = "Sarif Plugin.",
|
shortDescription = "Sarif Plugin.",
|
||||||
description = "From sarif parsing to DL modelling"
|
description = "SARIF parsing and visualization plugin."
|
||||||
)
|
)
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ public class SarifObject implements IsfObject {
|
|||||||
if (SARIF) {
|
if (SARIF) {
|
||||||
message = new JsonObject();
|
message = new JsonObject();
|
||||||
message.addProperty("text", key);
|
message.addProperty("text", key);
|
||||||
kind = "INFORMATIONAL";
|
kind = "informational"; // convention specifies lower-case
|
||||||
level = "NONE";
|
level = "none";
|
||||||
ruleId = ruleKey;
|
ruleId = ruleKey;
|
||||||
properties = new JsonObject();
|
properties = new JsonObject();
|
||||||
properties.add("additionalProperties", element);
|
properties.add("additionalProperties", element);
|
||||||
|
|||||||
@@ -24,7 +24,10 @@ public class SarifKindResultHandler extends SarifResultHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String parse() {
|
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() {
|
public String parse() {
|
||||||
return result.getLevel().toString();
|
if (result.getLevel() != null) {
|
||||||
|
return result.getLevel().toString();
|
||||||
|
}
|
||||||
|
return "none";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user