kev

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultBaseURL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"

Variables

This section is empty.

Functions

func DecodeData

func DecodeData(r io.Reader, catalog *Catalog) error

func DownloadData

func DownloadData(w io.Writer, optionFuncs ...fetchOptionFunc) error

func FetchData

func FetchData(catalog *Catalog, optionFuncs ...fetchOptionFunc) error

func WithClient

func WithClient(client *http.Client) fetchOptionFunc

func WithURL

func WithURL(url string) fetchOptionFunc

Types

type Catalog

type Catalog struct {
	Title           string          `json:"title"`
	CatalogVersion  string          `json:"catalogVersion"`
	DateReleased    time.Time       `json:"dateReleased"`
	Count           int             `json:"count"`
	Vulnerabilities []Vulnerability `json:"vulnerabilities"`
}

Catalog data model for KEVs

func NewCatalog

func NewCatalog() *Catalog

type FetchOptions

type FetchOptions struct {
	Client *http.Client
	URL    string
}

func DefaultFetchOptions

func DefaultFetchOptions() *FetchOptions

type Vulnerability

type Vulnerability struct {
	CveID             string `json:"cveID"`
	VendorProject     string `json:"vendorProject"`
	Product           string `json:"product"`
	VulnerabilityName string `json:"vulnerabilityName"`
	DateAdded         string `json:"dateAdded"`
	ShortDescription  string `json:"shortDescription"`
	RequiredAction    string `json:"requiredAction"`
	DueDate           string `json:"dueDate"`
	Notes             string `json:"notes"`
}

Vulnerability data model for a single record

Jump to

Keyboard shortcuts

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