nvd

package
v0.0.0-...-0ef91db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 18, 2018 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertNvdCpeDictionaryToModel

func ConvertNvdCpeDictionaryToModel(nvd CpeDictionary) (cpes []models.CategorizedCpe, err error)

ConvertNvdCpeDictionaryToModel :

func ConvertNvdV3FeedToModel

func ConvertNvdV3FeedToModel(nvds []V3Feed) (cpes []models.CategorizedCpe, err error)

ConvertNvdV3FeedToModel :

func FetchAndInsertCPE

func FetchAndInsertCPE(driver db.DB) (err error)

FetchAndInsertCPE : FetchAndInsertCPE

func FetchAndInsertCpeDictioanry

func FetchAndInsertCpeDictioanry(driver db.DB) (err error)

FetchAndInsertCpeDictioanry : FetchCPE

func FetchAndInsertV3Feed

func FetchAndInsertV3Feed(driver db.DB) (err error)

FetchAndInsertV3Feed : FetchAndInsertV3Feed

func GetYearsUntilThisYear

func GetYearsUntilThisYear(startYear int) (years []int, err error)

GetYearsUntilThisYear : GetYearsUntilThisYear

func MakeFeedURLBlocks

func MakeFeedURLBlocks(years []int, n int) (urlBlocks [][]string)

MakeFeedURLBlocks : MakeFeedURLBlocks

Types

type CpeDictionary

type CpeDictionary struct {
	Items []struct {
		Name      string `xml:"name,attr"`
		Cpe23Item struct {
			Name string `xml:"name,attr"`
		} `xml:"cpe23-item"`
	} `xml:"cpe-item"`
}

CpeDictionary has cpe-item list https://nvd.nist.gov/cpe.cfm

type V3Feed

type V3Feed struct {
	CVEItems []struct {
		Configurations struct {
			Nodes []struct {
				Cpe []struct {
					Cpe22URI string `json:"cpe22Uri"`
					Cpe23URI string `json:"cpe23Uri"`
				} `json:"cpe"`
			} `json:"nodes"`
		} `json:"configurations"`
	} `json:"CVE_Items"`
}

V3Feed : NvdV3Feed https://scap.nist.gov/schema/nvd/feed/0.1/nvd_cve_feed_json_0.1_beta.schema

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL