diff --git a/sarif_cli/scan_tables.py b/sarif_cli/scan_tables.py index 0613d82..28d02bc 100644 --- a/sarif_cli/scan_tables.py +++ b/sarif_cli/scan_tables.py @@ -91,7 +91,7 @@ def joins_for_projects(basetables, external_info): e.project_id = hash.hash_unique((repoUri+extra).encode()) else: repoUri = "unknown" - + res = pd.DataFrame(data={ "id" : e.project_id, "project_name" : repoUri, diff --git a/sarif_cli/signature.py b/sarif_cli/signature.py index c668a1d..e3d3f1e 100644 --- a/sarif_cli/signature.py +++ b/sarif_cli/signature.py @@ -56,6 +56,8 @@ def _signature_dict(args, elem, context: Context): if args.typedef_signatures: # Give every unique struct a name and use a reference to it as value. if signature not in context.sig_to_typedef: + #cannot have leading 0 hashes later in table joins so replace now + #context.sig_to_typedef[signature] = str("Struct%04d" % shorthash(signature)).replace("0", "1") context.sig_to_typedef[signature] = "Struct%04d" % shorthash(signature) typedef = context.sig_to_typedef[signature] return typedef @@ -82,6 +84,8 @@ def _signature_list(args, elem, context): if args.typedef_signatures: # Give every unique array a name and use a reference to it as value. if signature not in context.sig_to_typedef: + #cannot have leading 0 hashes later in table joins so replace now + #context.sig_to_typedef[signature] = str("Array%04d" % shorthash(signature)).replace("0", "1") context.sig_to_typedef[signature] = "Array%04d" % shorthash(signature) typedef = context.sig_to_typedef[signature] return typedef diff --git a/sarif_cli/table_joins.py b/sarif_cli/table_joins.py index 41c5faa..520f0c6 100644 --- a/sarif_cli/table_joins.py +++ b/sarif_cli/table_joins.py @@ -115,6 +115,8 @@ def joins_for_problem(tgraph, af_0350_location): # # Form the message dataframe (@kind problem) via joins # + import IPython + IPython.embed(header="spot 1") kind_problem_1 = ( aft(6343)