Documentation
¶
Index ¶
- type BaseMetricV2
- type CVEDataMeta
- type CVERecord
- func (c *CVERecord) CPEConfigurationsToJSONB() (postgres.Jsonb, error)
- func (c *CVERecord) CVEId() string
- func (c *CVERecord) CWE() string
- func (c *CVERecord) DescriptionMain() string
- func (c *CVERecord) DescriptionsToJSONB() (postgres.Jsonb, error)
- func (c *CVERecord) GetLastModifiedDate() time.Time
- func (c *CVERecord) GetPublishedDate() time.Time
- func (c *CVERecord) ProblemTypeToJSONB() (postgres.Jsonb, error)
- func (c *CVERecord) ReferencesToJSONB() (postgres.Jsonb, error)
- type CVEYearFile
- type Configurations
- type CpeMatch
- type CpeStruct
- type Cve
- type CvssV2
- type Description
- type DescriptionData
- type DescriptionInfo
- type Impact
- type Nodes
- type Problemtype
- type ProblemtypeData
- type ReferenceData
- type References
- type VersionCharNode
- func (v *VersionCharNode) AddChild(a *VersionCharNode)
- func (v *VersionCharNode) GetChild(a byte) (*VersionCharNode, error)
- func (v *VersionCharNode) GetChildren() []*VersionCharNode
- func (v *VersionCharNode) GetParent() VersionTreeNodeIf
- func (v *VersionCharNode) HaveLeaf() bool
- func (v *VersionCharNode) IsLeaf() bool
- func (v *VersionCharNode) IsRoot() bool
- func (v *VersionCharNode) NextString() []string
- func (v *VersionCharNode) PathString() string
- func (v *VersionCharNode) Versions() []string
- type VersionTree
- type VersionTreeNodeIf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMetricV2 ¶
type BaseMetricV2 struct { CvssV2 CvssV2 `json:"cvssV2"` Severity string `json:"severity"` ExploitabilityScore float64 `json:"exploitabilityScore"` ImpactScore float64 `json:"impactScore"` ObtainAllPrivilege bool `json:"obtainAllPrivilege"` ObtainUserPrivilege bool `json:"obtainUserPrivilege"` ObtainOtherPrivilege bool `json:"obtainOtherPrivilege"` UserInteractionRequired bool `json:"userInteractionRequired"` }
type CVEDataMeta ¶
type CVERecord ¶
type CVERecord struct { Cve Cve `json:"cve"` Configurations Configurations `json:"configurations"` Impact Impact `json:"impact"` PublishedDate string `json:"publishedDate"` LastModifiedDate string `json:"lastModifiedDate"` }
func (*CVERecord) CPEConfigurationsToJSONB ¶
func (*CVERecord) DescriptionMain ¶
func (*CVERecord) DescriptionsToJSONB ¶
func (*CVERecord) GetLastModifiedDate ¶
func (*CVERecord) GetPublishedDate ¶
func (*CVERecord) ProblemTypeToJSONB ¶
type CVEYearFile ¶
type CVEYearFile struct { CVEDataType string `json:"CVE_data_type"` CVEDataFormat string `json:"CVE_data_format"` CVEDataVersion string `json:"CVE_data_version"` CVEDataNumberOfCVEs string `json:"CVE_data_numberOfCVEs"` CVEDataTimestamp string `json:"CVE_data_timestamp"` CVERecords []CVERecord `json:"CVE_Items"` }
type Configurations ¶
type Configurations struct { CVEDataVersion string `json:"CVE_data_version"` Nodes []Nodes `json:"nodes"` }
func (*Configurations) ShowShorter ¶
func (c *Configurations) ShowShorter() string
func (*Configurations) ToHumanReadableString ¶
func (c *Configurations) ToHumanReadableString() string
func (*Configurations) ValidateCPE ¶
func (c *Configurations) ValidateCPE(cpes ...string) (bool, []string, error)
type CpeStruct ¶
type CpeStruct struct {
// 7 for specific fields
Part, Vendor, Product, Version, Update, Edition, Language string
// for default
Ext1, Ext2, Ext3, Ext4 string
}
func ParseCPEStringToStruct ¶
func (*CpeStruct) CPE23String ¶
func (*CpeStruct) ProductCPE23 ¶
func (*CpeStruct) ToLikeSearch ¶
type Cve ¶
type Cve struct { DataType string `json:"data_type"` DataFormat string `json:"data_format"` DataVersion string `json:"data_version"` CVEDataMeta CVEDataMeta `json:"CVE_data_meta"` Problemtype Problemtype `json:"problemtype"` References References `json:"references"` DescriptionInfo DescriptionInfo `json:"description"` }
type CvssV2 ¶
type CvssV2 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 Description ¶
type DescriptionData ¶
type DescriptionInfo ¶
type DescriptionInfo struct {
DescriptionData []DescriptionData `json:"description_data"`
}
type Impact ¶
type Impact struct {
BaseMetricV2 BaseMetricV2 `json:"baseMetricV2"`
}
type Nodes ¶
type Nodes struct { Operator string `json:"operator"` CpeMatch []CpeMatch `json:"cpe_match"` Children []Nodes `json:"children"` }
func (*Nodes) ToHumanReadableString ¶
func (*Nodes) ValidateString ¶
type Problemtype ¶
type Problemtype struct {
ProblemtypeData []ProblemtypeData `json:"problemtype_data"`
}
type ProblemtypeData ¶
type ProblemtypeData struct {
Description []Description `json:"description"`
}
type ReferenceData ¶
type References ¶
type References struct {
ReferenceData []ReferenceData `json:"reference_data"`
}
type VersionCharNode ¶
type VersionCharNode struct { VersionTreeNodeIf // contains filtered or unexported fields }
func (*VersionCharNode) AddChild ¶
func (v *VersionCharNode) AddChild(a *VersionCharNode)
func (*VersionCharNode) GetChild ¶
func (v *VersionCharNode) GetChild(a byte) (*VersionCharNode, error)
func (*VersionCharNode) GetChildren ¶
func (v *VersionCharNode) GetChildren() []*VersionCharNode
func (*VersionCharNode) GetParent ¶
func (v *VersionCharNode) GetParent() VersionTreeNodeIf
func (*VersionCharNode) HaveLeaf ¶
func (v *VersionCharNode) HaveLeaf() bool
func (*VersionCharNode) IsLeaf ¶
func (v *VersionCharNode) IsLeaf() bool
func (*VersionCharNode) IsRoot ¶
func (v *VersionCharNode) IsRoot() bool
func (*VersionCharNode) NextString ¶
func (v *VersionCharNode) NextString() []string
func (*VersionCharNode) PathString ¶
func (v *VersionCharNode) PathString() string
func (*VersionCharNode) Versions ¶
func (v *VersionCharNode) Versions() []string
type VersionTree ¶
type VersionTree struct { VersionTreeNodeIf // contains filtered or unexported fields }
func NewVersionTree ¶
func NewVersionTree(prefix string, version ...string) *VersionTree
func (*VersionTree) AddChild ¶
func (v *VersionTree) AddChild(a *VersionCharNode)
func (*VersionTree) GetChild ¶
func (v *VersionTree) GetChild(a byte) (*VersionCharNode, error)
func (*VersionTree) GetChildren ¶
func (v *VersionTree) GetChildren() []*VersionCharNode
func (*VersionTree) GetParent ¶
func (v *VersionTree) GetParent() VersionTreeNodeIf
func (*VersionTree) IsRoot ¶
func (v *VersionTree) IsRoot() bool
func (*VersionTree) Strings ¶
func (v *VersionTree) Strings() []string
type VersionTreeNodeIf ¶
type VersionTreeNodeIf interface { GetChild(a byte) (*VersionCharNode, error) AddChild(a *VersionCharNode) GetChildren() []*VersionCharNode GetParent() VersionTreeNodeIf IsRoot() bool }
Click to show internal directories.
Click to hide internal directories.