fetcher

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: May 10, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchRedHatVulnList added in v0.1.11

func FetchRedHatVulnList() (entries []models.RedhatCVEJSON, err error)

func GetRedhatCveDetailURL

func GetRedhatCveDetailURL(cveID string) (url string)

GetRedhatCveDetailURL returns CVE detail URL.

func ListAllRedhatCves

func ListAllRedhatCves(before, after string, wait int) (entries []models.RedhatEntry, err error)

ListAllRedhatCves returns the list of all CVEs from RedHat API https://access.redhat.com/documentation/en-us/red_hat_security_data_api/0.1/html-single/red_hat_security_data_api/#list_all_cves

func RetrieveMicrosoftBulletinSearch added in v0.1.11

func RetrieveMicrosoftBulletinSearch() (cves []models.MicrosoftBulletinSearch, err error)

RetrieveMicrosoftBulletinSearch :

func RetrieveMicrosoftCveDetails added in v0.1.11

func RetrieveMicrosoftCveDetails(apikey string) (cves []models.MicrosoftXML, err error)

RetrieveMicrosoftCveDetails : https://api.msrc.microsoft.com/cvrf/2017-Jan?api-version=2016-08-01

func RetrieveRedhatCveDetails

func RetrieveRedhatCveDetails(urls []string) (cves []models.RedhatCVEJSON, err error)

RetrieveRedhatCveDetails returns full CVE details from RedHat API https://access.redhat.com/documentation/en-us/red_hat_security_data_api/0.1/html-single/red_hat_security_data_api/#retrieve_a_cve

func XlsToModel added in v0.1.11

func XlsToModel(bs []byte) (cves []models.MicrosoftBulletinSearch, err error)

XlsToModel :

Types

type RedhatAffectedRelease added in v0.1.11

type RedhatAffectedRelease struct {
	ProductName string `json:"product_name"`
	ReleaseDate string `json:"release_date"`
	Advisory    string `json:"advisory"`
	Package     string `json:"package"`
	Cpe         string `json:"cpe"`
}

type RedhatBugzilla added in v0.1.11

type RedhatBugzilla struct {
	Description string `json:"description" sql:"type:text"`
	BugzillaID  string `json:"id"`
	URL         string `json:"url"`
}

type RedhatCVE added in v0.1.11

type RedhatCVE struct {
	ThreatSeverity       string         `json:"threat_severity"`
	PublicDate           string         `json:"public_date"`
	Bugzilla             RedhatBugzilla `json:"bugzilla"`
	Cvss                 RedhatCvss     `json:"cvss"`
	Cvss3                RedhatCvss3    `json:"cvss3"`
	Iava                 string         `json:"iava"`
	Cwe                  string         `json:"cwe"`
	Statement            string         `json:"statement"`
	Acknowledgement      string         `json:"acknowledgement"`
	Mitigation           string         `json:"mitigation"`
	TempAffectedRelease  interface{}    `json:"affected_release"` // affected_release is array or object
	AffectedRelease      []RedhatAffectedRelease
	TempPackageState     interface{} `json:"package_state"` // package_state is array or object
	PackageState         []RedhatPackageState
	Name                 string `json:"name"`
	DocumentDistribution string `json:"document_distribution"`

	Details    []string `json:"details"`
	References []string `json:"references"`
}

type RedhatCVEAffectedReleaseArray added in v0.1.11

type RedhatCVEAffectedReleaseArray struct {
	AffectedRelease []RedhatAffectedRelease `json:"affected_release"`
}

type RedhatCVEAffectedReleaseObject added in v0.1.11

type RedhatCVEAffectedReleaseObject struct {
	AffectedRelease RedhatAffectedRelease `json:"affected_release"`
}

type RedhatCVEPackageStateArray added in v0.1.11

type RedhatCVEPackageStateArray struct {
	PackageState []RedhatPackageState `json:"package_state"`
}

type RedhatCVEPackageStateObject added in v0.1.11

type RedhatCVEPackageStateObject struct {
	PackageState RedhatPackageState `json:"package_state"`
}

type RedhatCvss added in v0.1.11

type RedhatCvss struct {
	CvssBaseScore     string `json:"cvss_base_score"`
	CvssScoringVector string `json:"cvss_scoring_vector"`
	Status            string `json:"status"`
}

type RedhatCvss3 added in v0.1.11

type RedhatCvss3 struct {
	Cvss3BaseScore     string `json:"cvss3_base_score"`
	Cvss3ScoringVector string `json:"cvss3_scoring_vector"`
	Status             string `json:"status"`
}

type RedhatDetail added in v0.1.11

type RedhatDetail struct {
	Detail string `sql:"type:text"`
}

type RedhatPackageState added in v0.1.11

type RedhatPackageState struct {
	ProductName string `json:"product_name"`
	FixState    string `json:"fix_state"`
	PackageName string `json:"package_name"`
	Cpe         string `json:"cpe"`
}

type RedhatReference added in v0.1.11

type RedhatReference struct {
	Reference string `sql:"type:text"`
}

Jump to

Keyboard shortcuts

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