@@ -8,7 +8,6 @@ package main
8
8
9
9
import (
10
10
"context"
11
- "encoding/json"
12
11
"errors"
13
12
"flag"
14
13
"fmt"
@@ -31,7 +30,6 @@ import (
31
30
"golang.org/x/exp/slices"
32
31
"golang.org/x/tools/go/packages"
33
32
"golang.org/x/vulndb/internal/cvelistrepo"
34
- "golang.org/x/vulndb/internal/cveschema"
35
33
"golang.org/x/vulndb/internal/cveschema5"
36
34
"golang.org/x/vulndb/internal/database"
37
35
"golang.org/x/vulndb/internal/derrors"
@@ -125,9 +123,6 @@ func main() {
125
123
cmdFunc = func (name string ) error { return commit (ctx , name , ghsaClient ) }
126
124
case "cve" :
127
125
cmdFunc = func (name string ) error { return cveCmd (ctx , name ) }
128
- //TODO: (https://github.com/golang/go/issues/56356): Deprecate this command once CVE JSON 5.0 publishing is available
129
- case "cve4" :
130
- cmdFunc = func (name string ) error { return cve4Cmd (ctx , name , * indent ) }
131
126
case "fix" :
132
127
cmdFunc = func (name string ) error { return fix (ctx , name , ghsaClient ) }
133
128
case "osv" :
@@ -807,30 +802,6 @@ func writeCVE(r *report.Report, goID string) error {
807
802
return nil
808
803
}
809
804
810
- func cve4Cmd (ctx context.Context , filename string , indent bool ) (err error ) {
811
- defer derrors .Wrap (& err , "cve4(%q, %t)" , filename , indent )
812
- r , err := report .Read (filename )
813
- if err != nil {
814
- return err
815
- }
816
- return printCVE4 (r , filename , indent )
817
- }
818
-
819
- // printCVE4 takes a report and prints out the JSON CVE 4.0 Record to stdOut
820
- func printCVE4 (r * report.Report , filename string , indent bool ) error {
821
- var cve * cveschema.CVE
822
- var err error
823
- if cve , err = report .ToCVE (filename ); err != nil {
824
- return err
825
- }
826
- e := json .NewEncoder (os .Stdout )
827
- e .SetEscapeHTML (false )
828
- if indent {
829
- e .SetIndent ("" , "\t " )
830
- }
831
- return e .Encode (cve )
832
- }
833
-
834
805
var reportRegexp = regexp .MustCompile (`^(data/\w+)/(GO-\d\d\d\d-0*(\d+)\.yaml)$` )
835
806
836
807
func irun (name string , arg ... string ) error {
0 commit comments