Documentation ¶
Index ¶
- func ConvertNvdCpeDictionaryToModel(nvd CpeDictionary) (cpes []models.CategorizedCpe, err error)
- func ConvertNvdV3FeedToModel(nvds []V3Feed) (cpes []models.CategorizedCpe, err error)
- func FetchAndInsertCPE(driver db.DB) (err error)
- func FetchAndInsertCpeDictioanry(driver db.DB) (err error)
- func FetchAndInsertV3Feed(driver db.DB) (err error)
- func GetYearsUntilThisYear(startYear int) (years []int, err error)
- func MakeFeedURLBlocks(years []int, n int) (urlBlocks [][]string)
- type CpeDictionary
- type V3Feed
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 ¶
FetchAndInsertCPE : FetchAndInsertCPE
func FetchAndInsertCpeDictioanry ¶
FetchAndInsertCpeDictioanry : FetchCPE
func FetchAndInsertV3Feed ¶
FetchAndInsertV3Feed : FetchAndInsertV3Feed
func GetYearsUntilThisYear ¶
GetYearsUntilThisYear : GetYearsUntilThisYear
func MakeFeedURLBlocks ¶
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
Click to show internal directories.
Click to hide internal directories.