mirror of
https://github.com/hohn/sarif-cli.git
synced 2025-12-16 09:13:04 +01:00
Fix CLI sarif consumption for properties:
fullDescription primaryLocationStartColumnFingerprint
This commit is contained in:
@@ -298,11 +298,21 @@ def fillsig_dict(args, elem, context):
|
||||
# Ensure newlineSequences is present when versionControlProvenance is
|
||||
full_elem['newlineSequences'] = elem.get('newlineSequences', dummy_newlineSequences)
|
||||
|
||||
if 'primaryLocationLineHash' in elem.keys():
|
||||
# Ensure primaryLocationStartColumnFingerprint is present
|
||||
full_elem['primaryLocationStartColumnFingerprint'] = elem.get('primaryLocationStartColumnFingerprint', "fingerprint_placeholder")
|
||||
|
||||
|
||||
#this fix depends on optional property defaultConfiguration being presents
|
||||
if 'defaultConfiguration' in elem.keys():
|
||||
# Ensure fullDescription is present
|
||||
full_elem['fullDescription'] = elem.get('fullDescription', "description_placeholder")
|
||||
|
||||
if 'partialFingerprints' in elem.keys():
|
||||
# Ensure relatedLocations is present
|
||||
full_elem['relatedLocations'] = elem.get('relatedLocations',
|
||||
dummy_relatedLocations_entry)
|
||||
|
||||
|
||||
if 'physicalLocation' in elem.keys():
|
||||
# Ensure id and message are present
|
||||
full_elem['id'] = elem.get('id', -1)
|
||||
|
||||
Reference in New Issue
Block a user