mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 09:13:04 +01:00
Add ability to read automationDetails.id if present
This commit is contained in:
@@ -79,10 +79,14 @@ def joins_for_projects(basetables, external_info):
|
||||
"""
|
||||
b = basetables; e = external_info
|
||||
|
||||
extra = ""
|
||||
# if the sarif does have automationDetails
|
||||
if "automationDetails" in b.project:
|
||||
extra = b.project.automationDetails[0]
|
||||
# if the sarif does have versionControlProvenance
|
||||
if "repositoryUri" in b.project:
|
||||
repoUri = b.project.repositoryUri[0]
|
||||
e.project_id = hash.hash_unique(repoUri.encode())
|
||||
e.project_id = hash.hash_unique((repoUri+extra).encode())
|
||||
else:
|
||||
repoUri = "unknown"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user