From 8eabfd614ee006eb39023fc9fa6e17d13cf52492 Mon Sep 17 00:00:00 2001 From: Joost Voskuil Date: Thu, 25 Nov 2021 17:46:31 +0100 Subject: [PATCH] Update sarif.go (#713) * Update sarif.go Provide correct version information for Sarif Reports * Update test Set version to correct Sarif version --- report/sarif.go | 2 +- testdata/expected/report/sarif_simple.sarif | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/report/sarif.go b/report/sarif.go index 184a1073..7e5bc2f4 100644 --- a/report/sarif.go +++ b/report/sarif.go @@ -11,7 +11,7 @@ import ( func writeSarif(cfg config.Config, findings []*Finding, w io.WriteCloser) error { sarif := Sarif{ Schema: "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", - Version: version, + Version: "2.1.0", Runs: getRuns(cfg, findings), } diff --git a/testdata/expected/report/sarif_simple.sarif b/testdata/expected/report/sarif_simple.sarif index a9d2fe46..716b0f1a 100644 --- a/testdata/expected/report/sarif_simple.sarif +++ b/testdata/expected/report/sarif_simple.sarif @@ -1,6 +1,6 @@ { "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", - "version": "v8.0.0", + "version": "2.1.0", "runs": [ { "tool": {