Documentation
¶
Index ¶
- Constants
- func ConvertMicrosoft(vulns []MicrosoftVulnerability, supercedences []MicrosoftSupercedence) ([]MicrosoftCVE, []MicrosoftKBRelation)
- func ConvertRedhat(cveJSONs iter.Seq2[RedhatCVEJSON, error]) iter.Seq2[RedhatCVE, error]
- func ConvertUbuntu(cveJSONs iter.Seq2[UbuntuCVEJSON, error]) iter.Seq2[UbuntuCVE, error]
- type ArchADV
- type ArchADVJSON
- type ArchAdvisory
- type ArchIssue
- type ArchPackage
- type DebianCVE
- type DebianCveJSON
- type DebianCveMap
- type DebianJSON
- type DebianPackage
- type DebianRelease
- type DebianReleaseJSON
- type FetchMeta
- type MicrosoftCVE
- type MicrosoftKB
- type MicrosoftKBRelation
- type MicrosoftProduct
- type MicrosoftScoreSet
- type MicrosoftSupercedence
- type MicrosoftSupersededBy
- type MicrosoftVulnerability
- type RedhatAffectedRelease
- type RedhatBugzilla
- type RedhatCVE
- type RedhatCVEJSON
- type RedhatCVEJSONAffectedReleaseArray
- type RedhatCVEJSONAffectedReleaseObject
- type RedhatCVEJSONMitigationObject
- type RedhatCVEJSONPackageStateArray
- type RedhatCVEJSONPackageStateObject
- type RedhatCvss
- type RedhatCvss3
- type RedhatDetail
- type RedhatEntry
- type RedhatPackageState
- type RedhatReference
- type UbuntuBug
- type UbuntuCVE
- type UbuntuCVEJSON
- type UbuntuNote
- type UbuntuPatch
- type UbuntuPatchJSON
- type UbuntuReference
- type UbuntuReleasePatch
- type UbuntuUpstream
- type UbuntuUpstreamLink
Constants ¶
const LatestSchemaVersion = 3
LatestSchemaVersion manages the Schema version used in the latest Gost.
Variables ¶
This section is empty.
Functions ¶
func ConvertMicrosoft ¶ added in v0.4.1
func ConvertMicrosoft(vulns []MicrosoftVulnerability, supercedences []MicrosoftSupercedence) ([]MicrosoftCVE, []MicrosoftKBRelation)
ConvertMicrosoft :
func ConvertRedhat ¶ added in v0.4.1
ConvertRedhat :
func ConvertUbuntu ¶ added in v0.4.1
ConvertUbuntu :
Types ¶
type ArchADV ¶ added in v0.5.0
type ArchADV struct {
ID int64 `json:"-"`
Name string `json:"name" gorm:"type:varchar(255)"`
Packages []ArchPackage `json:"packages"`
Status string `json:"status" gorm:"type:varchar(255)"`
Severity string `json:"severity" gorm:"type:varchar(255)"`
Type string `json:"type" gorm:"type:varchar(255)"`
Affected string `json:"affected" gorm:"type:varchar(255)"`
Fixed *string `json:"fixed" gorm:"type:varchar(255)"`
Ticket *string `json:"ticket" gorm:"type:varchar(255)"`
Issues []ArchIssue `json:"issues"`
Advisories []ArchAdvisory `json:"advisories"`
}
ArchADV :
type ArchADVJSON ¶ added in v0.5.0
type ArchADVJSON struct {
Advisories []string `json:"advisories"`
Affected string `json:"affected"`
Fixed *string `json:"fixed"`
Issues []string `json:"issues"`
Name string `json:"name"`
Packages []string `json:"packages"`
Severity string `json:"severity"`
Status string `json:"status"`
Ticket *string `json:"ticket"`
Type string `json:"type"`
}
ArchADVJSON :
type ArchAdvisory ¶ added in v0.5.0
type ArchAdvisory struct {
ID int64 `json:"-"`
ArchADVID int64 `json:"-"`
Advisory string `json:"advisory" gorm:"type:varchar(255)"`
}
ArchAdvisory :
type ArchIssue ¶ added in v0.5.0
type ArchIssue struct {
ID int64 `json:"-"`
ArchADVID int64 `json:"-"`
Issue string `json:"issue" gorm:"type:varchar(255);index:idx_arch_issues_issue"`
}
ArchIssue :
type ArchPackage ¶ added in v0.5.0
type ArchPackage struct {
ID int64 `json:"-"`
ArchADVID int64 `json:"-"`
Name string `json:"name" gorm:"type:varchar(255);index:idx_arch_packages_name"`
}
ArchPackage :
type DebianCVE ¶
type DebianCVE struct {
ID int64 `json:"-"`
CveID string `gorm:"index:idx_debian_cves_cveid;type:varchar(255);"`
Scope string `gorm:"type:varchar(255)"`
Description string
Package []DebianPackage
}
DebianCVE :
func ConvertDebian ¶ added in v0.4.1
func ConvertDebian(cveJSONs DebianJSON) []DebianCVE
ConvertDebian :
type DebianCveJSON ¶
type DebianCveJSON struct {
Scope string `json:"scope"`
Debianbug int `json:"debianbug"`
Description string `json:"description"`
Releases map[string]DebianReleaseJSON `json:"releases"`
}
DebianCveJSON :
type DebianPackage ¶
type DebianPackage struct {
ID int64 `json:"-"`
DebianCVEID int64 `json:"-" gorm:"index:idx_debian_packages_debian_cve_id"`
PackageName string `gorm:"type:varchar(255);index:idx_debian_packages_package_name"`
Release []DebianRelease
}
DebianPackage :
type DebianRelease ¶
type DebianRelease struct {
ID int64 `json:"-"`
DebianPackageID int64 `json:"-" gorm:"index:idx_debian_releases_debian_package_id"`
ProductName string `gorm:"type:varchar(255);index:idx_debian_releases_product_name"`
Status string `gorm:"type:varchar(255);index:idx_debian_releases_status"`
FixedVersion string `gorm:"type:varchar(255);"`
Urgency string `gorm:"type:varchar(255);"`
Version string `gorm:"type:varchar(255);"`
}
DebianRelease :
type DebianReleaseJSON ¶
type DebianReleaseJSON struct {
Status string `json:"status"`
Repositories map[string]string `json:"repositories"`
FixedVersion string `json:"fixed_version"`
Urgency string `json:"urgency"`
}
DebianReleaseJSON :
type FetchMeta ¶ added in v0.3.0
type FetchMeta struct {
gorm.Model `json:"-"`
GostRevision string
SchemaVersion uint
LastFetchedAt time.Time
}
FetchMeta has meta information about fetched security tracker
type MicrosoftCVE ¶ added in v0.3.0
type MicrosoftCVE struct {
ID int64 `json:"-"`
CveID string `json:"cve_id" gorm:"type:varchar(255);index:idx_microsoft_cves_cveid"`
Title string `json:"title" gorm:"type:text"`
Description string `json:"description" gorm:"type:text"`
FAQ string `json:"faq" gorm:"type:text"`
Tag string `json:"tag" gorm:"type:varchar(255)"`
CNA string `json:"cna" gorm:"type:varchar(255)"`
ExploitStatus string `json:"exploit_status" gorm:"type:varchar(255)"`
Mitigation string `json:"mitigation" gorm:"type:text"`
Workaround string `json:"workaround" gorm:"type:text"`
Products []MicrosoftProduct `json:"products"`
URL string `json:"url" gorm:"type:varchar(255)"`
Acknowledgments string `json:"acknowledgments" gorm:"type:text"`
PublishDate time.Time `json:"publish_date"`
LastUpdateDate time.Time `json:"last_update_date"`
}
MicrosoftCVE :
type MicrosoftKB ¶ added in v0.4.2
type MicrosoftKB struct {
ID int64 `json:"-"`
MicrosoftProductID int64 `json:"-" gorm:"index:idx_microsoft_kb_microsoft_product_id"`
Article string `json:"article" gorm:"type:varchar(255);index:idx_microsoft_kb_article"`
RestartRequired string `json:"restart_required" gorm:"type:varchar(255)"`
SubType string `json:"sub_type" gorm:"type:varchar(255)"`
FixedBuild string `json:"fixed_build" gorm:"type:varchar(255)"`
ArticleURL string `json:"article_url" gorm:"type:varchar(255)"`
DownloadURL string `json:"download_url" gorm:"type:varchar(255)"`
}
MicrosoftKB :
type MicrosoftKBRelation ¶ added in v0.4.1
type MicrosoftKBRelation struct {
ID int64 `json:"-"`
KBID string `json:"kbid" gorm:"type:varchar(255);index:idx_microsoft_relation_kb_id"`
SupersededBy []MicrosoftSupersededBy
}
MicrosoftKBRelation :
type MicrosoftProduct ¶ added in v0.3.0
type MicrosoftProduct struct {
ID int64 `json:"-"`
MicrosoftCVEID int64 `json:"-" gorm:"index:idx_microsoft_product_microsoft_cve_id"`
ProductID string `json:"product_id" gorm:"type:varchar(255)"`
Name string `json:"name" gorm:"type:varchar(255)"`
Impact string `json:"impact" gorm:"type:varchar(255)"`
Severity string `json:"severity" gorm:"type:varchar(255)"`
ScoreSet MicrosoftScoreSet `json:"score_set"`
KBs []MicrosoftKB `json:"kbs"`
}
MicrosoftProduct :
type MicrosoftScoreSet ¶ added in v0.3.0
type MicrosoftScoreSet struct {
ID int64 `json:"-"`
MicrosoftProductID int64 `json:"-" gorm:"index:idx_microsoft_score_set_microsoft_product_id"`
BaseScore string `json:"base_score" gorm:"type:varchar(255)"`
TemporalScore string `json:"temporal_score" gorm:"type:varchar(255)"`
Vector string `json:"vector" gorm:"type:varchar(255)"`
}
MicrosoftScoreSet :
type MicrosoftSupercedence ¶ added in v0.4.2
type MicrosoftSupercedence struct {
KBID string `json:"KBID"`
UpdateID string `json:"UpdateID"`
Product string `json:"Product"`
Supersededby struct {
KBIDs []string `json:"KBIDs"`
UpdateIDs []string `json:"UpdateIDs"`
} `json:"Supersededby"`
}
MicrosoftSupercedence :
type MicrosoftSupersededBy ¶ added in v0.4.1
type MicrosoftSupersededBy struct {
ID int64 `json:"-"`
MicrosoftKBRelationID int64 `json:"-" gorm:"index:idx_microsoft_superseded_by_microsoft_kb_relation_id"`
KBID string `json:"kbid" gorm:"type:varchar(255);index:idx_microsoft_superseded_by_kb_id"`
}
MicrosoftSupersededBy :
type MicrosoftVulnerability ¶ added in v0.4.2
type MicrosoftVulnerability struct {
CveID string `json:"CVEID"`
Title string `json:"Title"`
Description string `json:"Description"`
FAQs []string `json:"FAQs"`
Tag string `json:"Tag"`
CNA string `json:"CNA"`
ExploitStatus string `json:"ExploitStatus"`
Mitigation string `json:"Mitigation"`
Workaround string `json:"Workaround"`
Products []struct {
ProductID string `json:"ProductID"`
Name string `json:"Name"`
Impact string `json:"Impact"`
Severity string `json:"Severity"`
ScoreSet struct {
BaseScore string `json:"BaseScore"`
TemporalScore string `json:"TemporalScore"`
Vector string `json:"Vector"`
} `json:"ScoreSet,omitempty"`
KBs []struct {
Article string `json:"Article"`
RestartRequired string `json:"RestartRequired"`
SubType string `json:"SubType"`
FixedBuild string `json:"FixedBuild"`
ArticleURL string `json:"ArticleURL"`
DownloadURL string `json:"DownloadURL"`
} `json:"KBs,omitempty"`
} `json:"Products"`
URL string `json:"URL"`
Acknowledgments []struct {
Name string `json:"Name"`
} `json:"Acknowledgments"`
Revisions []revision `json:"Revisions"`
}
MicrosoftVulnerability :
type RedhatAffectedRelease ¶
type RedhatAffectedRelease struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_affected_releases_redhat_cve_id"`
ProductName string `json:"product_name" gorm:"type:varchar(255)"`
ReleaseDate string `json:"release_date" gorm:"type:varchar(255)"`
Advisory string `json:"advisory" gorm:"type:varchar(255)"`
Package string `json:"package" gorm:"type:varchar(255)"`
Cpe string `json:"cpe" gorm:"type:varchar(255)"`
}
RedhatAffectedRelease :
type RedhatBugzilla ¶
type RedhatBugzilla struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_bugzillas_redhat_cve_id"`
Description string `json:"description" gorm:"type:text"`
BugzillaID string `json:"id" gorm:"type:varchar(255)"`
URL string `json:"url" gorm:"type:varchar(255)"`
}
RedhatBugzilla :
type RedhatCVE ¶
type RedhatCVE struct {
ID int64 `json:"-"`
// gorm can't handle embedded struct
ThreatSeverity string `gorm:"type:varchar(255)"`
PublicDate time.Time
Bugzilla RedhatBugzilla
Cvss RedhatCvss
Cvss3 RedhatCvss3
Iava string `gorm:"type:varchar(255)"`
Cwe string `gorm:"type:varchar(255)"`
Statement string `gorm:"type:text"`
Acknowledgement string `gorm:"type:text"`
Mitigation string `gorm:"type:text"`
AffectedRelease []RedhatAffectedRelease
PackageState []RedhatPackageState
Name string `gorm:"type:varchar(255);index:idx_redhat_cves_name"`
DocumentDistribution string `gorm:"type:text"`
Details []RedhatDetail
References []RedhatReference
}
RedhatCVE :
func (RedhatCVE) GetPackages ¶
GetPackages returns package names
type RedhatCVEJSON ¶
type RedhatCVEJSON 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"`
TempMitigation interface{} `json:"mitigation"`
Mitigation string
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" gorm:"-"`
References []string `json:"references" gorm:"-"`
}
RedhatCVEJSON :
type RedhatCVEJSONAffectedReleaseArray ¶
type RedhatCVEJSONAffectedReleaseArray struct {
AffectedRelease []RedhatAffectedRelease `json:"affected_release"`
}
RedhatCVEJSONAffectedReleaseArray :
type RedhatCVEJSONAffectedReleaseObject ¶
type RedhatCVEJSONAffectedReleaseObject struct {
AffectedRelease RedhatAffectedRelease `json:"affected_release"`
}
RedhatCVEJSONAffectedReleaseObject :
type RedhatCVEJSONMitigationObject ¶ added in v0.4.5
RedhatCVEJSONMitigationObject :
type RedhatCVEJSONPackageStateArray ¶
type RedhatCVEJSONPackageStateArray struct {
PackageState []RedhatPackageState `json:"package_state"`
}
RedhatCVEJSONPackageStateArray :
type RedhatCVEJSONPackageStateObject ¶
type RedhatCVEJSONPackageStateObject struct {
PackageState RedhatPackageState `json:"package_state"`
}
RedhatCVEJSONPackageStateObject :
type RedhatCvss ¶
type RedhatCvss struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_cvsses_redhat_cve_id"`
CvssBaseScore string `json:"cvss_base_score" gorm:"type:varchar(255)"`
CvssScoringVector string `json:"cvss_scoring_vector" gorm:"type:varchar(255)"`
Status string `json:"status" gorm:"type:varchar(255)"`
}
RedhatCvss :
type RedhatCvss3 ¶
type RedhatCvss3 struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_cvss3_redhat_cve_id"`
Cvss3BaseScore string `json:"cvss3_base_score" gorm:"type:varchar(255)"`
Cvss3ScoringVector string `json:"cvss3_scoring_vector" gorm:"type:varchar(255)"`
Status string `json:"status" gorm:"type:varchar(255)"`
}
RedhatCvss3 :
type RedhatDetail ¶
type RedhatDetail struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_details_redhat_cve_id"`
Detail string `gorm:"type:text"`
}
RedhatDetail :
type RedhatEntry ¶
type RedhatEntry struct {
CveID string `json:"CVE"`
Severity string `json:"severity"`
PublicDate time.Time `json:"public_date"`
Advisories []interface{} `json:"advisories"`
Bugzilla string `json:"bugzilla"`
CvssScore interface{} `json:"cvss_score"`
CvssScoringVector interface{} `json:"cvss_scoring_vector"`
CWE string `json:"CWE"`
AffectedPackages []interface{} `json:"affected_packages"`
ResourceURL string `json:"resource_url"`
Cvss3Score string `json:"cvss3_score"`
Cvss3ScoringVector string `json:"cvss3_scoring_vector"`
}
RedhatEntry :
type RedhatPackageState ¶
type RedhatPackageState struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_package_states_redhat_cve_id"`
ProductName string `json:"product_name" gorm:"type:varchar(255)"`
FixState string `json:"fix_state" gorm:"type:varchar(255);index:idx_redhat_package_states_fix_state"`
PackageName string `json:"package_name" gorm:"type:varchar(255);index:idx_redhat_package_states_package_name"`
Cpe string `json:"cpe" gorm:"type:varchar(255);index:idx_redhat_package_states_cpe"`
}
RedhatPackageState :
type RedhatReference ¶
type RedhatReference struct {
ID int64 `json:"-"`
RedhatCVEID int64 `json:"-" gorm:"index:idx_redhat_references_redhat_cve_id"`
Reference string `gorm:"type:text"`
}
RedhatReference :
type UbuntuBug ¶ added in v0.3.0
type UbuntuBug struct {
ID int64 `json:"-"`
UbuntuCVEID int64 `json:"-" gorm:"index:idx_ubuntu_bug_ubuntu_cve_id"`
Bug string `json:"bug" gorm:"type:text"`
}
UbuntuBug :
type UbuntuCVE ¶ added in v0.3.0
type UbuntuCVE struct {
ID int64 `json:"-"`
PublicDateAtUSN time.Time `json:"public_date_at_usn"`
CRD time.Time `json:"crd"`
Candidate string `json:"candidate" gorm:"type:varchar(255);index:idx_ubuntu_cve_candidate"`
PublicDate time.Time `json:"public_date"`
References []UbuntuReference `json:"references"`
Description string `json:"description" gorm:"type:text"`
UbuntuDescription string `json:"ubuntu_description" gorm:"type:text"`
Notes []UbuntuNote `json:"notes"`
Bugs []UbuntuBug `json:"bugs"`
Priority string `json:"priority" gorm:"type:varchar(255)"`
DiscoveredBy string `json:"discovered_by" gorm:"type:text"`
AssignedTo string `json:"assigned_to" gorm:"type:varchar(255)"`
Patches []UbuntuPatch `json:"patches"`
Upstreams []UbuntuUpstream `json:"upstreams"`
}
UbuntuCVE :
type UbuntuCVEJSON ¶ added in v0.3.0
type UbuntuCVEJSON struct {
PublicDateAtUSN time.Time
CRD time.Time
Candidate string
PublicDate time.Time
References []string
Description string
UbuntuDescription string
Notes []string
Bugs []string
Priority string
DiscoveredBy string
AssignedTo string
Patches map[string]map[string]UbuntuPatchJSON
UpstreamLinks map[string][]string
}
UbuntuCVEJSON :
type UbuntuNote ¶ added in v0.3.0
type UbuntuNote struct {
ID int64 `json:"-"`
UbuntuCVEID int64 `json:"-" gorm:"index:idx_ubuntu_note_ubuntu_cve_id"`
Note string `json:"note" gorm:"type:text"`
}
UbuntuNote :
type UbuntuPatch ¶ added in v0.3.0
type UbuntuPatch struct {
ID int64 `json:"-"`
UbuntuCVEID int64 `json:"-" gorm:"index:idx_ubuntu_patch_ubuntu_cve_id"`
PackageName string `json:"package_name" gorm:"type:varchar(255);index:idx_ubuntu_patch_package_name"`
ReleasePatches []UbuntuReleasePatch `json:"release_patches"`
}
UbuntuPatch :
type UbuntuPatchJSON ¶ added in v0.3.0
UbuntuPatchJSON :
type UbuntuReference ¶ added in v0.3.0
type UbuntuReference struct {
ID int64 `json:"-"`
UbuntuCVEID int64 `json:"-" gorm:"index:idx_ubuntu_reference_ubuntu_cve_id"`
Reference string `json:"reference" gorm:"type:text"`
}
UbuntuReference :
type UbuntuReleasePatch ¶ added in v0.3.0
type UbuntuReleasePatch struct {
ID int64 `json:"-"`
UbuntuPatchID int64 `json:"-" gorm:"index:idx_ubuntu_release_patch_ubuntu_patch_id"`
ReleaseName string `json:"release_name" gorm:"type:varchar(255);index:idx_ubuntu_release_patch_release_name"`
Status string `json:"status" gorm:"type:varchar(255);index:idx_ubuntu_release_patch_status"`
Note string `json:"note" gorm:"type:varchar(255)"`
}
UbuntuReleasePatch :
type UbuntuUpstream ¶ added in v0.3.0
type UbuntuUpstream struct {
ID int64 `json:"-"`
UbuntuCVEID int64 `json:"-" gorm:"index:idx_ubuntu_upstream_ubuntu_cve_id"`
PackageName string `json:"package_name" gorm:"type:varchar(255)"`
UpstreamLinks []UbuntuUpstreamLink `json:"upstream_links"`
}
UbuntuUpstream :
type UbuntuUpstreamLink ¶ added in v0.3.0
type UbuntuUpstreamLink struct {
ID int64 `json:"-"`
UbuntuUpstreamID int64 `json:"-" gorm:"index:idx_ubuntu_upstream_link_ubuntu_upstream_id"`
Link string `json:"link" gorm:"type:text"`
}
UbuntuUpstreamLink :