Documentation ¶
Index ¶
Constants ¶
View Source
const ( RSSFeed = "https://nvd.nist.gov/download/nvd-rss-analyzed.xml" CVEURLBase = "https://nvd.nist.gov/feeds/json/cve/1.1/" NVDAPIEndpoint = "https://services.nvd.nist.gov/rest/json/cves/2.0" PageSize = 2000 // maximum page size with the 2.0 API is 2000 CVEPathDefault = "cve_jsons" )
View Source
const CVETimeFormat = "2006-01-02T15:04:05.000"
Variables ¶
This section is empty.
Functions ¶
func LatestCVEsIDs ¶
Types ¶
type CVE ¶
type CVE struct { ID string `json:"id"` SourceIdentifier string `json:"sourceIdentifier"` Published CVETime `json:"published"` LastModified CVETime `json:"lastModified"` VulnStatus string `json:"vulnStatus"` Descriptions []Description `json:"descriptions"` Metrics struct { CvssMetricV2 []struct { Source string `json:"source"` Type string `json:"type"` CvssData struct { Version string `json:"version"` VectorString string `json:"vectorString"` AccessVector string `json:"accessVector"` AccessComplexity string `json:"accessComplexity"` Authentication string `json:"authentication"` ConfidentialityImpact string `json:"confidentialityImpact"` IntegrityImpact string `json:"integrityImpact"` AvailabilityImpact string `json:"availabilityImpact"` BaseScore float64 `json:"baseScore"` } `json:"cvssData"` BaseSeverity string `json:"baseSeverity"` ExploitabilityScore float64 `json:"exploitabilityScore"` ImpactScore float64 `json:"impactScore"` AcInsufInfo bool `json:"acInsufInfo"` ObtainAllPrivilege bool `json:"obtainAllPrivilege"` ObtainUserPrivilege bool `json:"obtainUserPrivilege"` ObtainOtherPrivilege bool `json:"obtainOtherPrivilege"` UserInteractionRequired bool `json:"userInteractionRequired"` } `json:"cvssMetricV2"` } `json:"metrics"` Weaknesses []struct { Source string `json:"source"` Type string `json:"type"` Description []struct { Lang string `json:"lang"` Value string `json:"value"` } `json:"description"` } `json:"weaknesses"` Configurations []struct { Nodes []struct { Operator string `json:"operator"` Negate bool `json:"negate"` CpeMatch []struct { Vulnerable bool `json:"vulnerable"` Criteria string `json:"criteria"` MatchCriteriaID string `json:"matchCriteriaId"` } `json:"cpeMatch"` } `json:"nodes"` } `json:"configurations"` References []struct { URL string `json:"url"` Source string `json:"source"` } `json:"references"` }
func (*CVE) Vulnerable ¶
type Description ¶
type NVDClient ¶
func NewNVDClient ¶
func (*NVDClient) CVEbyID ¶
Download one "page" of the CVE data using the 2.0 API Pages are offset based, this assumes the default (and maximum) page size of PageSize Maintaining the recommended 6 seconds betweens calls is left to the caller. See https://nvd.nist.gov/developers/vulnerabilities
type NVDResponse ¶
type NVDResponse struct { ResultsPerPage int `json:"resultsPerPage"` StartIndex int `json:"startIndex"` TotalResults int `json:"totalResults"` Format string `json:"format"` Version string `json:"version"` Timestamp string `json:"timestamp"` Vulnerabilities []Vulnerabilities `json:"vulnerabilities"` }
type Vulnerabilities ¶
type Vulnerabilities struct {
CVE CVE `json:"cve"`
}
Click to show internal directories.
Click to hide internal directories.