Documentation ¶
Index ¶
- type Cpe
- type CveDetail
- type CveDetails
- type CveDictionary
- type Jvn
- func (c Jvn) CveSummary() string
- func (c Jvn) CveTitle() string
- func (c Jvn) CvssScore() float64
- func (c Jvn) CvssSeverity() string
- func (c Jvn) CvssVector() string
- func (c Jvn) GetCveDetailID() uint
- func (c Jvn) GetID() uint
- func (c Jvn) LastModified() time.Time
- func (c Jvn) Link() string
- func (c *Jvn) SetCpes(r []Cpe)
- func (c *Jvn) SetCveDetailID(id uint)
- func (c *Jvn) SetVulnSiteReferences(r []Reference)
- func (c Jvn) VulnSiteReferences() []Reference
- type Nvd
- func (c Nvd) CveSummary() string
- func (c Nvd) CveTitle() string
- func (c Nvd) CvssScore() float64
- func (c Nvd) CvssVector() string
- func (c Nvd) GetCveDetailID() uint
- func (c Nvd) GetID() uint
- func (c Nvd) LastModified() time.Time
- func (c Nvd) Link() string
- func (c *Nvd) SetCpes(r []Cpe)
- func (c *Nvd) SetCveDetailID(id uint)
- func (c Nvd) SetVulnSiteReferences(r []Reference)
- func (c Nvd) Severity() string
- func (c Nvd) VulnSiteReferences() []Reference
- type Reference
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cpe ¶
type Cpe struct { gorm.Model JvnID uint NvdID uint // CPE Name (URL sytle) // JVN ... cpe:/a:oracle:mysql // NVD ... cpe:/a:cisco:unified_contact_center_express:11.0%281%29 CpeName string // each items Part string Vendor string Product string Version string Update string Edition string Language string }
Cpe is Child model of Jvn/Nvd. see https://www.ipa.go.jp/security/vuln/CPE.html
type CveDetail ¶
CveDetail is a parent of Jnv/Nvd model
func (CveDetail) CvssV2CalculatorLink ¶
CvssV2CalculatorLink returns cvss Caluculate site URL. https://nvd.nist.gov/cvss/v2-calculator?name=CVE-2015-5477&vector=(AV:N/AC:L/Au:N/C:N/I:N/A:C)
type CveDetails ¶
type CveDetails []CveDetail
CveDetails is for sorting
func (CveDetails) Len ¶
func (c CveDetails) Len() int
func (CveDetails) Less ¶
func (c CveDetails) Less(i, j int) bool
func (CveDetails) Swap ¶
func (c CveDetails) Swap(i, j int)
type CveDictionary ¶
type CveDictionary interface { GetID() uint GetCveDetailID() uint SetCveDetailID(id uint) CveTitle() string CveSummary() string CvssScore() float64 CvssVector() string CvssSeverity() string Link() string VulnSiteReferences() []Reference SetVulnSiteReferences([]Reference) SetCpes([]Cpe) LastModified() time.Time }
CveDictionary is interface of JVN, NVD
type Jvn ¶
type Jvn struct { gorm.Model CveDetailID uint Title string Summary string JvnLink string JvnID string Score float64 // 1 to 10 Severity string // Low|Medium|High Vector string // (AV:N/AC:M/Au:N/C:N/I:P/A:N) References []Reference Cpes []Cpe PublishedDate time.Time LastModifiedDate time.Time }
Jvn is a model of JVN
func (*Jvn) SetVulnSiteReferences ¶
SetVulnSiteReferences set References
func (Jvn) VulnSiteReferences ¶
VulnSiteReferences return summary
type Nvd ¶
type Nvd struct { gorm.Model CveDetailID uint Summary string Score float64 // 1 to 10 AccessVector string AccessComplexity string Authentication string ConfidentialityImpact string IntegrityImpact string AvailabilityImpact string Cpes []Cpe References []Reference PublishedDate time.Time LastModifiedDate time.Time }
Nvd is a model of NVD
func (Nvd) CvssVector ¶
CvssVector make CVSS Vector string https://nvd.nist.gov/cvss.cfm?vectorinfo&version=2
Example 1: (AV:L/AC:H/Au:N/C:N/I:P/A:C) Example 2: (AV:A/AC:L/Au:M/C:C/I:N/A:P)
func (Nvd) SetVulnSiteReferences ¶
SetVulnSiteReferences set References
func (Nvd) Severity ¶
Severity return severity ranking that NVD povided. https://nvd.nist.gov/cvss.cfm
func (Nvd) VulnSiteReferences ¶
VulnSiteReferences return References