mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 17:23:03 +01:00
Bugfix signature subset superset mismatch
when the template signature portion contains codeflows it was previously possible that a valid sarif problem portion that contains extra fields would be misdiagnosed as not parsable
This commit is contained in:
@@ -195,6 +195,11 @@ def _destructure_dict(typegraph: Typegraph, node, tree):
|
|||||||
f"Check input file for the original signature."
|
f"Check input file for the original signature."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
else:
|
||||||
|
# possibly looks like: (Struct9699)type_fields: [codeflows...] vs tree_fields: [...extra_properties]
|
||||||
|
# in that case we need to also try the Struct4055 signature here
|
||||||
|
if "codeFlows" in type_fields:
|
||||||
|
_destructure_dict(typegraph, "Struct4055", tree)
|
||||||
else:
|
else:
|
||||||
status_writer.unknown_sarif_parsing_shape["extra_info"] = "type fields {} do not match tree fields {}.".format(type_fields, tree_fields)
|
status_writer.unknown_sarif_parsing_shape["extra_info"] = "type fields {} do not match tree fields {}.".format(type_fields, tree_fields)
|
||||||
status_writer.csv_write(status_writer.unknown_sarif_parsing_shape)
|
status_writer.csv_write(status_writer.unknown_sarif_parsing_shape)
|
||||||
|
|||||||
Reference in New Issue
Block a user