Update sarif.go (#713)

* Update sarif.go

Provide correct version information for Sarif Reports

* Update test

Set version to correct Sarif version
This commit is contained in:
Joost Voskuil authored and GitHub committed 2021-11-25 10:46:31 -06:00
1 parent 4acd7a3c8d
commit 8eabfd614e
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -11,7 +11,7 @@ import (
func writeSarif(cfg config.Config, findings []*Finding, w io.WriteCloser) error { func writeSarif(cfg config.Config, findings []*Finding, w io.WriteCloser) error {
sarif := Sarif{ sarif := Sarif{
Schema: "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", Schema: "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
Version: version, Version: "2.1.0",
Runs: getRuns(cfg, findings), Runs: getRuns(cfg, findings),
} }
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json", "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
"version": "v8.0.0", "version": "2.1.0",
"runs": [ "runs": [
{ {
"tool": { "tool": {