Просмотр исходного кода

Update sarif.go (#713)

* Update sarif.go

Provide correct version information for Sarif Reports

* Update test

Set version to correct Sarif version
Joost Voskuil 4 лет назад
Родитель
Сommit
8eabfd614e
2 измененных файлов с 2 добавлено и 2 удалено
  1. 1 1
      report/sarif.go
  2. 1 1
      testdata/expected/report/sarif_simple.sarif

+ 1 - 1
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),
 	}
 

+ 1 - 1
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": {