Procházet zdrojové kódy

Update sarif.go (#713)

* Update sarif.go

Provide correct version information for Sarif Reports

* Update test

Set version to correct Sarif version
Joost Voskuil před 4 roky
rodič
revize
8eabfd614e
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  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": {