Documentation
¶
Overview ¶
Package kev uses CISA's KEV Catalog for vulnerability analysis
Cyber Infrastructure and Security Agency (CISA) Known Exploited Vulnerabilities ¶
CISA maintains the authoritative source of vulnerabilities that have been exploited in the wild: the Known Exploited Vulnerability (KEV) catalog. CISA strongly recommends all organizations review and monitor the KEV catalog and prioritize remediation of the listed vulnerabilities to reduce the likelihood of compromise by known threat actors.
Index ¶
Constants ¶
const CVERecordURL = "https://www.cve.org/CVERecord?id=%s"
CVERecordURL will replace '%s' with the CVE for single record queries
const DefaultBaseURL = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
DefaultBaseURL url for downloading the entire catalog in JSON format
const FileTypeJSON = "CISA KEV Catalog [JSON]"
FileTypeJSON filetype plaintext
Variables ¶
var ErrAPI = errors.New("KEV API error")
ErrAPI any errors while requesting the API
Functions ¶
func NewJSONDecoder ¶
func NewJSONDecoder() *gce.JSONWriterDecoder[Catalog]
NewJSONDecoder standard decoder for JSON with a check function for field validation
Types ¶
type APIAgent ¶
type APIAgent struct {
// contains filtered or unexported fields
}
APIAgent wraps the API call in an io.Reader to serve as a common interface
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
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides a validator with internal data for cross referencing
func (*Service) GrypeDenyRuleFunc ¶
GrypeDenyRuleFunc denies any vulnerability matched to the KEV Vatalog
func (*Service) MatchedVulnerabilities ¶
func (s *Service) MatchedVulnerabilities(r *grype.ScanReport) []models.Match
MatchedVulnerabilities return a slice of vulnerabilities matched to the KEV Catalog
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