From 1003f622122b858b7da7af893aca58cd8640cd3e Mon Sep 17 00:00:00 2001 From: Kota Kanbe Date: Thu, 26 Aug 2021 13:45:40 +0900 Subject: [PATCH] chore: update go-cve-dictionary (#1292) --- detector/cve_client.go | 1 + detector/detector.go | 9 +++++---- detector/exploitdb.go | 1 + detector/github.go | 1 + detector/library.go | 1 + detector/msf.go | 1 + detector/util.go | 1 + detector/wordpress.go | 1 + detector/wordpress_test.go | 1 + go.mod | 4 ++-- go.sum | 8 ++++---- gost/debian.go | 1 + gost/debian_test.go | 1 + gost/gost.go | 1 + gost/gost_test.go | 1 + gost/microsoft.go | 1 + gost/pseudo.go | 1 + gost/redhat.go | 1 + gost/redhat_test.go | 1 + gost/ubuntu.go | 1 + gost/util.go | 1 + models/utils.go | 1 + oval/alpine.go | 1 + oval/debian.go | 1 + oval/debian_test.go | 1 + oval/oval.go | 1 + oval/redhat.go | 1 + oval/redhat_test.go | 1 + oval/suse.go | 1 + oval/util.go | 1 + oval/util_test.go | 1 + server/server.go | 1 + subcmds/report.go | 1 + subcmds/server.go | 1 + subcmds/tui.go | 1 + 35 files changed, 43 insertions(+), 10 deletions(-) diff --git a/detector/cve_client.go b/detector/cve_client.go index 869ff455..377292b2 100644 --- a/detector/cve_client.go +++ b/detector/cve_client.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/detector.go b/detector/detector.go index 5ebcb610..fb10fb36 100644 --- a/detector/detector.go +++ b/detector/detector.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector @@ -286,8 +287,8 @@ func FillCvesWithNvdJvn(r *models.ScanResult, cnf config.GoCveDictConf, logOpts } for _, d := range ds { - nvds, exploits, mitigations := models.ConvertNvdToModel(d.CveID, d.Nvd) - jvns := models.ConvertJvnToModel(d.CveID, d.Jvn) + nvds, exploits, mitigations := models.ConvertNvdToModel(d.CveID, d.Nvds) + jvns := models.ConvertJvnToModel(d.CveID, d.Jvns) alerts := fillCertAlerts(&d) for cveID, vinfo := range r.ScannedCves { @@ -312,7 +313,7 @@ func FillCvesWithNvdJvn(r *models.ScanResult, cnf config.GoCveDictConf, logOpts } func fillCertAlerts(cvedetail *cvemodels.CveDetail) (dict models.AlertDict) { - for _, nvd := range cvedetail.Nvd { + for _, nvd := range cvedetail.Nvds { for _, cert := range nvd.Certs { dict.En = append(dict.En, models.Alert{ URL: cert.Link, @@ -322,7 +323,7 @@ func fillCertAlerts(cvedetail *cvemodels.CveDetail) (dict models.AlertDict) { } } - for _, jvn := range cvedetail.Jvn { + for _, jvn := range cvedetail.Jvns { for _, cert := range jvn.Certs { dict.Ja = append(dict.Ja, models.Alert{ URL: cert.Link, diff --git a/detector/exploitdb.go b/detector/exploitdb.go index bdc9101e..03b6f326 100644 --- a/detector/exploitdb.go +++ b/detector/exploitdb.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/github.go b/detector/github.go index dd05e980..f4f3589a 100644 --- a/detector/github.go +++ b/detector/github.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/library.go b/detector/library.go index 26d7c5e0..c1fd64b2 100644 --- a/detector/library.go +++ b/detector/library.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/msf.go b/detector/msf.go index e750ac0c..31c4a118 100644 --- a/detector/msf.go +++ b/detector/msf.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/util.go b/detector/util.go index 7c56e078..1f5083a2 100644 --- a/detector/util.go +++ b/detector/util.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/wordpress.go b/detector/wordpress.go index 672cae51..21d71e2a 100644 --- a/detector/wordpress.go +++ b/detector/wordpress.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/detector/wordpress_test.go b/detector/wordpress_test.go index d5cc1c10..47ddca1a 100644 --- a/detector/wordpress_test.go +++ b/detector/wordpress_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package detector diff --git a/go.mod b/go.mod index 28a112ad..ebec6233 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/emersion/go-sasl v0.0.0-20200509203442-7bfe0ed36a21 github.com/emersion/go-smtp v0.14.0 github.com/fatih/color v1.12.0 // indirect - github.com/fsnotify/fsnotify v1.5.0 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-redis/redis/v8 v8.11.3 // indirect github.com/go-stack/stack v1.8.1 // indirect github.com/google/subcommands v1.2.0 @@ -36,7 +36,7 @@ require ( github.com/knqyf263/go-deb-version v0.0.0-20190517075300-09fca494f03d github.com/knqyf263/go-rpm-version v0.0.0-20170716094938-74609b86c936 github.com/knqyf263/gost v0.2.0 - github.com/kotakanbe/go-cve-dictionary v0.7.0 + github.com/kotakanbe/go-cve-dictionary v0.7.1-0.20210824005621-13337a1b780a github.com/kotakanbe/go-pingscanner v0.1.0 github.com/kotakanbe/goval-dictionary v0.3.6-0.20210625044258-9be85404d7dd github.com/kotakanbe/logrus-prefixed-formatter v0.0.0-20180123152602-928f7356cb96 diff --git a/go.sum b/go.sum index c0019786..0e409137 100644 --- a/go.sum +++ b/go.sum @@ -444,8 +444,8 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/fsnotify/fsnotify v1.5.0 h1:NO5hkcB+srp1x6QmwvNZLeaOgbM8cmBTN32THzjvu2k= -github.com/fsnotify/fsnotify v1.5.0/go.mod h1:BX0DCEr5pT4jm2CnQdVP1lFV521fcCNcyEeNp4DQQDk= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -926,8 +926,8 @@ github.com/knqyf263/nested v0.0.1/go.mod h1:zwhsIhMkBg90DTOJQvxPkKIypEHPYkgWHs4g github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kotakanbe/go-cve-dictionary v0.7.0 h1:EtKT8jaQPPN/h3GXTOeygqJFq8GBpCCOXMdlNAaWrks= -github.com/kotakanbe/go-cve-dictionary v0.7.0/go.mod h1:icV09UzWPPhiolVRPAwDuMfmMxwJKyVsgo4qRkyUMHE= +github.com/kotakanbe/go-cve-dictionary v0.7.1-0.20210824005621-13337a1b780a h1:zd5nv+HE8A3oTJ3RPitGt1MA1EKhbQ2k6TKWMKMEij8= +github.com/kotakanbe/go-cve-dictionary v0.7.1-0.20210824005621-13337a1b780a/go.mod h1:icV09UzWPPhiolVRPAwDuMfmMxwJKyVsgo4qRkyUMHE= github.com/kotakanbe/go-pingscanner v0.1.0 h1:VG4/9l0i8WeToXclj7bIGoAZAu7a07Z3qmQiIfU0gT0= github.com/kotakanbe/go-pingscanner v0.1.0/go.mod h1:/761QZzuZFcfN8h/1QuawUA+pKukp3qcNj5mxJCOiAk= github.com/kotakanbe/goval-dictionary v0.3.6-0.20210625044258-9be85404d7dd h1:hnkOzwlknmNU64P5UaQzAZcyNnuSsCz/PIt/P/ZPKYg= diff --git a/gost/debian.go b/gost/debian.go index b007c4ed..699c57eb 100644 --- a/gost/debian.go +++ b/gost/debian.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/debian_test.go b/gost/debian_test.go index 638a0577..8c7a799c 100644 --- a/gost/debian_test.go +++ b/gost/debian_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/gost.go b/gost/gost.go index cb420388..91d31da7 100644 --- a/gost/gost.go +++ b/gost/gost.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/gost_test.go b/gost/gost_test.go index 9defdede..57b35ff5 100644 --- a/gost/gost_test.go +++ b/gost/gost_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/microsoft.go b/gost/microsoft.go index 96b3cf3b..c42e792e 100644 --- a/gost/microsoft.go +++ b/gost/microsoft.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/pseudo.go b/gost/pseudo.go index f9a4055c..d6b7b241 100644 --- a/gost/pseudo.go +++ b/gost/pseudo.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/redhat.go b/gost/redhat.go index 38afa4ba..e702d18f 100644 --- a/gost/redhat.go +++ b/gost/redhat.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/redhat_test.go b/gost/redhat_test.go index fe2f4f08..aaba50a9 100644 --- a/gost/redhat_test.go +++ b/gost/redhat_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/ubuntu.go b/gost/ubuntu.go index e25c0d99..793df383 100644 --- a/gost/ubuntu.go +++ b/gost/ubuntu.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/gost/util.go b/gost/util.go index 2e862402..18a6baba 100644 --- a/gost/util.go +++ b/gost/util.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package gost diff --git a/models/utils.go b/models/utils.go index b3089a33..cbd36e65 100644 --- a/models/utils.go +++ b/models/utils.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package models diff --git a/oval/alpine.go b/oval/alpine.go index 8a6563d9..e581a138 100644 --- a/oval/alpine.go +++ b/oval/alpine.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/debian.go b/oval/debian.go index 5bc86d59..ab0a7674 100644 --- a/oval/debian.go +++ b/oval/debian.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/debian_test.go b/oval/debian_test.go index 431f90d7..ed47724e 100644 --- a/oval/debian_test.go +++ b/oval/debian_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/oval.go b/oval/oval.go index 21c28333..7888521d 100644 --- a/oval/oval.go +++ b/oval/oval.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/redhat.go b/oval/redhat.go index 27358670..be71a3b7 100644 --- a/oval/redhat.go +++ b/oval/redhat.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/redhat_test.go b/oval/redhat_test.go index 8172f6e3..bcd0000b 100644 --- a/oval/redhat_test.go +++ b/oval/redhat_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/suse.go b/oval/suse.go index fc0ec3ea..92e2efd9 100644 --- a/oval/suse.go +++ b/oval/suse.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/util.go b/oval/util.go index c546105e..9bc2a145 100644 --- a/oval/util.go +++ b/oval/util.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/oval/util_test.go b/oval/util_test.go index 6de1d650..b28a34b7 100644 --- a/oval/util_test.go +++ b/oval/util_test.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package oval diff --git a/server/server.go b/server/server.go index bf40861e..180c0573 100644 --- a/server/server.go +++ b/server/server.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package server diff --git a/subcmds/report.go b/subcmds/report.go index 671aebd4..79969fcc 100644 --- a/subcmds/report.go +++ b/subcmds/report.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package subcmds diff --git a/subcmds/server.go b/subcmds/server.go index 48664d33..6674333d 100644 --- a/subcmds/server.go +++ b/subcmds/server.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package subcmds diff --git a/subcmds/tui.go b/subcmds/tui.go index 52328509..b552c5b8 100644 --- a/subcmds/tui.go +++ b/subcmds/tui.go @@ -1,3 +1,4 @@ +//go:build !scanner // +build !scanner package subcmds