From 6b475becd98125b413ac8211617f7e407a784e94 Mon Sep 17 00:00:00 2001 From: Daniel Beer Date: Fri, 30 Dec 2022 12:40:07 -0500 Subject: [PATCH 1/2] Fix exception reraising --- bin/sarif-extract-scans | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/sarif-extract-scans b/bin/sarif-extract-scans index d891f71..d1e1292 100755 --- a/bin/sarif-extract-scans +++ b/bin/sarif-extract-scans @@ -95,7 +95,7 @@ except Exception: # will have gathered errors/warnings status_writer.csv_write_warnings() #pass the exception up to be put into log by runner - raise(Exception) + raise # # Form output tables @@ -164,7 +164,7 @@ try: except Exception: #possible warnings accumulated status_writer.csv_write_warnings() - raise Exception + raise # # Setup rest of basetables @@ -274,4 +274,4 @@ _write_dataframes_of(scantabs) write('codeflows', bt.codeflows) status_writer.warning_set["success"]+=1 -status_writer.csv_write_warnings() \ No newline at end of file +status_writer.csv_write_warnings() From e8123903f691ed9724c0a288112fa597d45909f4 Mon Sep 17 00:00:00 2001 From: Benjamin Groh Date: Wed, 18 Jan 2023 16:40:36 -0500 Subject: [PATCH 2/2] Use repositoryUri instead of org/repo --- bin/sarif-aggregate-scans | 3 +-- bin/sarif-create-aggregate-report | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/bin/sarif-aggregate-scans b/bin/sarif-aggregate-scans index de1a0a7..22d2d28 100755 --- a/bin/sarif-aggregate-scans +++ b/bin/sarif-aggregate-scans @@ -131,11 +131,10 @@ for path in paths: # Paths and components # path = path.rstrip() - project, component = path.split('/') # # Validate input data directory and content # - output_dir = os.path.join(args.in_dir+project, component + ".scantables") + output_dir = os.path.join(args.in_dir+ path + ".scantables") if not os.path.exists(output_dir): continue if not _all_csv_files_exist(output_dir): diff --git a/bin/sarif-create-aggregate-report b/bin/sarif-create-aggregate-report index b84861e..fa85833 100755 --- a/bin/sarif-create-aggregate-report +++ b/bin/sarif-create-aggregate-report @@ -56,11 +56,10 @@ data = [] for path in paths: path = path.rstrip() - project, component = path.split('/') # # Validate input data directory and content # - csv_infile = os.path.join(args.in_dir+project, component + ".csv") + csv_infile = os.path.join(args.in_dir+ path + ".csv") if not os.path.exists(csv_infile): continue else: