Skip to content

Commit

Permalink
use empty digest if it doesn't exist in generated report (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
maratsal authored May 15, 2024
1 parent 89212b1 commit 7cb42dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions github/new-scan-engine/sysdig-to-sarif.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def generate_report(data):
"columnKind": "utf16CodeUnits",
"properties": {
"pullString": f"{data['result']['metadata']['pullString']}",
"digest": f"{data['result']['metadata']['digest']}",
"digest": f"{(data['result']['metadata']['digest'] if 'digest' in data['result']['metadata'] else '')}",
"imageId": f"{data['result']['metadata']['imageId']}",
"architecture": f"{data['result']['metadata']['architecture']}",
"baseOs": f"{data['result']['metadata']['baseOs']}",
Expand Down Expand Up @@ -172,4 +172,4 @@ def main():
print(json.dumps(report))

if __name__ == '__main__':
main()
main()

0 comments on commit 7cb42dc

Please sign in to comment.