Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CvssData ¶
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"` }
type NVDCve ¶
type NVDCve struct { Cve struct { ID string `json:"id"` SourceIdentifier string `json:"sourceIdentifier"` PublishedDate string `json:"published"` LastModifiedDate string `json:"lastModified"` VulnStatus string `json:"vulnStatus"` Description []struct { Lang string `json:"lang"` Value string `json:"value"` } `json:"descriptions"` Metrics struct { BaseMetricV31 []struct { CvssData CvssData `json:"cvssData"` ExploitabilityScore float64 `json:"exploitabilityScore"` ImpactScore float64 `json:"impactScore"` } `json:"cvssMetricV31"` BaseMetricV3 []struct { CvssData CvssData `json:"cvssData"` ExploitabilityScore float64 `json:"exploitabilityScore"` ImpactScore float64 `json:"impactScore"` } `json:"cvssMetricV30"` BaseMetricV2 []struct { Source string `json:"source"` Type string `json:"type"` CvssData CvssData `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"` References []struct { URL string `json:"url"` Refsource string `json:"source"` } `json:"references"` Configurations []struct { Nodes []struct { Operator string `json:"operator"` Negate bool `json:"negate"` CpeMatch []struct { Criteria string `json:"criteria"` MatchCriteriaID string `json:"matchCriteriaId"` Vulnerable bool `json:"vulnerable"` VersionStartIncluding string `json:"versionStartIncluding"` VersionStartExcluding string `json:"versionStartExcluding"` VersionEndIncluding string `json:"versionEndIncluding"` VersionEndExcluding string `json:"versionEndExcluding"` } `json:"cpeMatch"` } `json:"nodes"` } `json:"configurations"` } `json:"cve"` }
type NVDFetcher ¶
func NewNVDFetcher ¶
func NewNVDFetcher() *NVDFetcher
func (*NVDFetcher) ConvertNvdDataToCVE ¶
func (fetcher *NVDFetcher) ConvertNvdDataToCVE(nvdData NVDData) []models.CVE
ConvertNvdDataToCVE converts NvdData to an array of CVE structs.
func (*NVDFetcher) FetchCVEData ¶
func (fetcher *NVDFetcher) FetchCVEData() (NVDData, error)
FetchCVEData fetches CVE data from NVD API and returns the result.
func (*NVDFetcher) SetNVDClient ¶
func (fetcher *NVDFetcher) SetNVDClient(client NVDClient)
func (*NVDFetcher) SetNVDKey ¶
func (fetcher *NVDFetcher) SetNVDKey(key string)
Click to show internal directories.
Click to hide internal directories.