From 3dfb297612414146497d43f141cb5a068f0d8c58 Mon Sep 17 00:00:00 2001 From: Michael Hohn Date: Thu, 20 Jul 2023 22:39:10 -0700 Subject: [PATCH] Make project_name unique by adding automationDetails to it --- sarif_cli/scan_tables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sarif_cli/scan_tables.py b/sarif_cli/scan_tables.py index e5c382b..95cea09 100644 --- a/sarif_cli/scan_tables.py +++ b/sarif_cli/scan_tables.py @@ -89,13 +89,14 @@ def joins_for_projects(basetables, external_info): # if the sarif does have versionControlProvenance if "repositoryUri" in b.project: repoUri = b.project.repositoryUri[0] + project_name = b.project.repositoryUri[0] + "-" + extra e.project_id = hash.hash_unique((repoUri+extra).encode()) else: repoUri = "unknown" res = pd.DataFrame(data={ "id" : e.project_id, - "project_name" : repoUri, + "project_name" : project_name, "creation_date" : pd.Timestamp(0.0, unit='s'), # TODO: external info "repo_url" : repoUri, "primary_language" : b.project['semmle.sourceLanguage'][0],