Documentation ¶
Index ¶
- Constants
- func GetURLByYear(source, year string) (url string, err error)
- type Cert
- type CpeBase
- type CpeDetail
- type CpeWFN
- type CveDetail
- type Cvss2
- type Cvss3
- type FetchMeta
- type Fortinet
- type FortinetCpe
- type FortinetCvss3
- type FortinetCwe
- type FortinetReference
- type Jvn
- type JvnCert
- type JvnCpe
- type JvnCvss2
- type JvnCvss3
- type JvnReference
- type Nvd
- type NvdCert
- type NvdCpe
- type NvdCvss2Extra
- type NvdCvss3
- type NvdCwe
- type NvdDescription
- type NvdEnvCpe
- type NvdReference
- type Reference
Constants ¶
const ( // NvdType : NvdType = "NVD" // JvnType : JvnType = "JVN" // FortinetType : FortinetType = "Fortinet" // NvdExactVersionMatch : NvdExactVersionMatch = "NvdExactVersionMatch" // NvdRoughVersionMatch : NvdRoughVersionMatch = "NvdRoughVersionMatch" // NvdVendorProductMatch : NvdVendorProductMatch = "NvdVendorProductMatch" // JvnVendorProductMatch : JvnVendorProductMatch = "JvnVendorProductMatch" // FortinetExactVersionMatch : FortinetExactVersionMatch = "FortinetExactVersionMatch" // FortinetRoughVersionMatch : FortinetRoughVersionMatch = "FortinetRoughVersionMatch" // FortinetVendorProductMatch : FortinetVendorProductMatch = "FortinetVendorProductMatch" )
const LatestSchemaVersion = 3
LatestSchemaVersion manages the Schema version used in the latest go-cve-dictionary.
Variables ¶
This section is empty.
Functions ¶
func GetURLByYear ¶ added in v0.8.1
GetURLByYear returns url
Types ¶
type CpeBase ¶ added in v0.2.0
type CpeBase struct { URI string `gorm:"index;type:varchar(255)"` FormattedString string `gorm:"index;type:varchar(255)"` WellFormedName string `gorm:"type:text"` CpeWFN `gorm:"embedded"` VersionStartExcluding string `gorm:"type:varchar(255)"` VersionStartIncluding string `gorm:"type:varchar(255)"` VersionEndExcluding string `gorm:"type:varchar(255)"` VersionEndIncluding string `gorm:"type:varchar(255)"` }
CpeBase has common args of Cpe and EnvCpe
type CpeDetail ¶ added in v0.8.1
type CpeDetail struct { Nvds []NvdCpe Jvns []JvnCpe Fortinet []FortinetCpe }
CpeDetail :
type CpeWFN ¶ added in v0.2.0
type CpeWFN struct { Part string `gorm:"index;type:varchar(255)"` Vendor string `gorm:"index;type:varchar(255)"` Product string `gorm:"index;type:varchar(255)"` Version string `gorm:"type:varchar(255)"` Update string `gorm:"type:varchar(255)"` Edition string `gorm:"type:varchar(255)"` Language string `gorm:"type:varchar(255)"` SoftwareEdition string `gorm:"type:varchar(255)"` TargetSW string `gorm:"type:varchar(255)"` TargetHW string `gorm:"type:varchar(255)"` Other string `gorm:"type:varchar(255)"` }
CpeWFN has CPE Well Formed name information
type CveDetail ¶
CveDetail :
func (CveDetail) HasFortinet ¶ added in v0.10.0
HasFortinet returns true if Fortinet contents
type Cvss2 ¶ added in v0.2.0
type Cvss2 struct { VectorString string `gorm:"type:varchar(255)"` AccessVector string `gorm:"type:varchar(255)"` AccessComplexity string `gorm:"type:varchar(255)"` Authentication string `gorm:"type:varchar(255)"` ConfidentialityImpact string `gorm:"type:varchar(255)"` IntegrityImpact string `gorm:"type:varchar(255)"` AvailabilityImpact string `gorm:"type:varchar(255)"` BaseScore float64 Severity string `gorm:"type:varchar(255)"` }
Cvss2 has CVSS Version 2 info
type Cvss3 ¶ added in v0.2.0
type Cvss3 struct { VectorString string `gorm:"type:varchar(255)"` AttackVector string `gorm:"type:varchar(255)"` AttackComplexity string `gorm:"type:varchar(255)"` PrivilegesRequired string `gorm:"type:varchar(255)"` UserInteraction string `gorm:"type:varchar(255)"` Scope string `gorm:"type:varchar(255)"` ConfidentialityImpact string `gorm:"type:varchar(255)"` IntegrityImpact string `gorm:"type:varchar(255)"` AvailabilityImpact string `gorm:"type:varchar(255)"` BaseScore float64 BaseSeverity string `gorm:"type:varchar(255)"` ExploitabilityScore float64 ImpactScore float64 }
Cvss3 has CVSS Version 3 info
type FetchMeta ¶ added in v0.8.1
type FetchMeta struct { gorm.Model `json:"-"` GoCVEDictRevision string SchemaVersion uint LastFetchedAt time.Time }
FetchMeta has meta information about fetched CVE data
type Fortinet ¶ added in v0.10.0
type Fortinet struct { ID int64 `json:"-"` AdvisoryID string `gorm:"type:varchar(255)"` CveID string `gorm:"index:idx_fortinets_cveid;type:varchar(255)"` Title string `gorm:"type:varchar(255)"` Summary string `gorm:"type:text"` Descriptions string `gorm:"type:text"` Cvss3 FortinetCvss3 Cwes []FortinetCwe Cpes []FortinetCpe References []FortinetReference PublishedDate time.Time LastModifiedDate time.Time AdvisoryURL string `gorm:"type:text"` DetectionMethod string `gorm:"-"` }
Fortinet is a model of Fortinet
type FortinetCpe ¶ added in v0.10.0
type FortinetCpe struct { ID int64 `json:"-"` FortinetID uint `json:"-" gorm:"index:idx_fortinet_cpes_fortinet_id"` CpeBase `gorm:"embedded"` }
FortinetCpe is Child model of Fortinet.
type FortinetCvss3 ¶ added in v0.10.0
type FortinetCvss3 struct { ID int64 `json:"-"` FortinetID uint `json:"-" gorm:"index:idx_fortinet_cvss3_fortinet_id"` Cvss3 `gorm:"embedded"` }
FortinetCvss3 has Fortinet CVSS3 info
type FortinetCwe ¶ added in v0.10.0
type FortinetCwe struct { ID int64 `json:"-"` FortinetID uint `json:"-" index:"idx_fortinet_cwes_fortinet_id"` CweID string `gorm:"type:varchar(255)"` }
FortinetCwe has CweID
type FortinetReference ¶ added in v0.10.0
type FortinetReference struct { ID int64 `json:"-"` FortinetID uint `json:"-" gorm:"index:idx_fortinet_references_fortinet_id"` Reference `gorm:"embedded"` }
FortinetReference holds reference information about the CVE.
type Jvn ¶
type Jvn struct { ID int64 `json:"-"` CveID string `gorm:"index:idx_jvns_cveid;type:varchar(255)"` Title string `gorm:"type:varchar(255)"` Summary string `gorm:"type:text"` JvnLink string `gorm:"type:varchar(255)"` JvnID string `gorm:"type:varchar(255)"` Cvss2 JvnCvss2 Cvss3 JvnCvss3 Cpes []JvnCpe References []JvnReference Certs []JvnCert PublishedDate time.Time LastModifiedDate time.Time DetectionMethod string `gorm:"-"` }
Jvn is a model of JVN
type JvnCert ¶ added in v0.8.1
type JvnCert struct { ID int64 `json:"-"` JvnID uint `json:"-" gorm:"index:idx_jvn_certs_jvn_id"` Cert `gorm:"embedded"` }
JvnCert is Child model of Jvn.
type JvnCpe ¶ added in v0.8.1
type JvnCpe struct { ID int64 `json:"-"` JvnID uint `json:"-" gorm:"index:idx_jvn_cpes_jvn_id"` CpeBase `gorm:"embedded"` }
JvnCpe is Child model of Jvn. see https://www.ipa.go.jp/security/vuln/CPE.html
type JvnCvss2 ¶ added in v0.8.1
type JvnCvss2 struct { ID int64 `json:"-"` JvnID uint `json:"-" gorm:"index:idx_jvn_cvss2_jvn_id"` Cvss2 `gorm:"embedded"` }
JvnCvss2 has Jvn CVSS Version 2 info
type JvnCvss3 ¶ added in v0.8.1
type JvnCvss3 struct { ID int64 `json:"-"` JVNID uint `json:"-" gorm:"index:idx_jvn_cvss3_jvn_id"` Cvss3 `gorm:"embedded"` }
JvnCvss3 has JVN CVSS3 info
type JvnReference ¶ added in v0.8.1
type JvnReference struct { ID int64 `json:"-"` JvnID uint `json:"-" gorm:"index:idx_jvn_references_jvn_id"` Reference `gorm:"embedded"` }
JvnReference is Child model of Jvn.
type Nvd ¶
type Nvd struct { ID int64 `json:"-"` CveID string `gorm:"index:idx_nvds_cveid;type:varchar(255)"` Descriptions []NvdDescription Cvss2 []NvdCvss2Extra Cvss3 []NvdCvss3 Cwes []NvdCwe Cpes []NvdCpe References []NvdReference Certs []NvdCert PublishedDate time.Time LastModifiedDate time.Time DetectionMethod string `gorm:"-"` }
Nvd is a struct of NVD JSON https://scap.nist.gov/schema/nvd/feed/0.1/nvd_cve_feed_json_0.1_beta.schema
type NvdCert ¶ added in v0.8.1
type NvdCert struct { ID int64 `json:"-"` NvdID uint `json:"-" gorm:"index:idx_nvd_certs_nvd_id"` Cert `gorm:"embedded"` }
NvdCert is Child model of Nvd.
type NvdCpe ¶ added in v0.8.1
type NvdCpe struct { ID int64 `json:"-"` NvdID uint `json:"-" gorm:"index:idx_nvd_cpes_nvd_id"` CpeBase `gorm:"embedded"` EnvCpes []NvdEnvCpe }
NvdCpe is Child model of Nvd. see https://www.ipa.go.jp/security/vuln/CPE.html In NVD, configurations>nodes>cpe>vulnerable: true
type NvdCvss2Extra ¶ added in v0.8.1
type NvdCvss2Extra struct { ID int64 `json:"-"` NvdID uint `json:"-" gorm:"index:idx_nvd_cvss2_extra_nvd_id"` Source string `gorm:"type:text"` Type string `gorm:"type:varchar(255)"` Cvss2 `gorm:"embedded"` ExploitabilityScore float64 ImpactScore float64 ObtainAllPrivilege bool ObtainUserPrivilege bool ObtainOtherPrivilege bool UserInteractionRequired bool }
NvdCvss2Extra has Nvd extra CVSS V2 info
type NvdCvss3 ¶ added in v0.8.1
type NvdCvss3 struct { ID int64 `json:"-"` NvdID uint `json:"-" gorm:"index:idx_nvd_cvss3_nvd_id"` Source string `gorm:"type:text"` Type string `gorm:"type:varchar(255)"` Cvss3 `gorm:"embedded"` }
NvdCvss3 has Nvd CVSS3 info
type NvdCwe ¶ added in v0.8.1
type NvdCwe struct { ID int64 `json:"-"` NvdID uint `json:"-" index:"idx_nvd_cwes_nvd_id"` Source string `gorm:"type:text"` Type string `gorm:"type:varchar(255)"` CweID string `gorm:"type:varchar(255)"` }
NvdCwe has CweID
type NvdDescription ¶ added in v0.8.1
type NvdDescription struct { ID int64 `json:"-"` NvdID uint `json:"-" gorm:"index:idx_nvd_descriptions_nvd_id"` Lang string `gorm:"type:varchar(255)"` Value string `gorm:"type:text"` }
NvdDescription has description of the CVE
type NvdEnvCpe ¶ added in v0.8.1
type NvdEnvCpe struct { ID int64 `json:"-"` NvdCpeID uint `json:"-" gorm:"index:idx_nvd_env_cpes_nvd_cpe_id"` CpeBase `gorm:"embedded"` }
NvdEnvCpe is a Environmental CPE Only NVD has this information. configurations>nodes>cpe>vulnerable: false
type NvdReference ¶ added in v0.8.1
type NvdReference struct { ID int64 `json:"-"` NvdID uint `json:"-" gorm:"index:idx_nvd_references_nvd_id"` Reference `gorm:"embedded"` }
NvdReference holds reference information about the CVE.