chore: update go-cve-dictionary (#1292)

This commit is contained in:
Kota Kanbe
2021-08-26 13:45:40 +09:00
committed by GitHub
parent 9b18e1f9f0
commit 1003f62212
35 changed files with 43 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -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,

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package detector

4
go.mod
View File

@@ -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

8
go.sum
View File

@@ -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=

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package gost

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package models

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package oval

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package server

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package subcmds

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package subcmds

View File

@@ -1,3 +1,4 @@
//go:build !scanner
// +build !scanner
package subcmds