Documentation ¶
Index ¶
- Constants
- func AmendCveDoc(doc string) string
- func Render(w io.Writer, source []byte) error
- func ValidateCveData(cves []*Vulnerability) error
- type AdditionalFields
- type Affected
- type Attributes
- type Containers
- type Content
- type CveMetadata
- type Cvssv3
- type Event
- type JSONRenderer
- type K8sVulnDB
- type Layout
- type Mark
- type MarkAttributes
- type MarkStruct
- type MitreCVE
- type MitreVersion
- type Node
- type NodeType
- type Range
- type Version
- type Vulnerability
Constants ¶
View Source
const ( NodeTypeNone = "none" NodeTypeBlockquote = "blockquote" NodeTypeBulletList = "bulletList" NodeTypeCodeBlock = "codeBlock" NodeTypeHeading = "heading" NodeTypeMediaGroup = "mediaGroup" NodeTypeMediaSingle = "mediaSingle" NodeTypeOrderedList = "orderedList" NodeTypePanel = "panel" NodeTypeParagraph = "paragraph" NodeTypeRule = "rule" NodeTypeTable = "table" NodeTypeListItem = "listItem" NodeTypeMedia = "media" NodeTypeTableCell = "table_cell" NodeTypeTableHeader = "table_header" NodeTypeTableRow = "table_row" NodeTypeEmoji = "emoji" NodeTypeHardBreak = "hardBreak" NodeTypeInlineCard = "inlineCard" NodeTypeMention = "mention" NodeTypeText = "text" )
View Source
const ( LayoutWrapLeft = "wrap-left" LayoutCenter = "center" LayoutWrapRight = "wrap-right" LayoutWide = "wide" LayoutFullWidth = "full-width" LayoutAlignStart = "align-start" LayoutAlignEnd = "align-end" )
Enum values for Layout in Attributes struct
View Source
const (
// Kubernetes is a container orchestration system for Docker containers
ExcludeNonCoreComponentsCves = "CVE-2019-11255"
)
Variables ¶
This section is empty.
Functions ¶
func AmendCveDoc ¶
func ValidateCveData ¶
func ValidateCveData(cves []*Vulnerability) error
Types ¶
type AdditionalFields ¶
type Attributes ¶
type Containers ¶
type Containers struct { Cna struct { Affected []struct { Product string Vendor string Versions []*MitreVersion } Descriptions []struct { Value string } } }
type CveMetadata ¶
type CveMetadata struct {
CveId string
}
type JSONRenderer ¶
type JSONRenderer struct {
// contains filtered or unexported fields
}
func NewRenderer ¶
func NewRenderer() *JSONRenderer
func (*JSONRenderer) AddOptions ¶
func (*JSONRenderer) AddOptions(...renderer.Option)
type MarkAttributes ¶
type MarkStruct ¶
type MarkStruct struct { Type Mark `json:"type,omitempty"` Attributes *MarkAttributes `json:"attrs,omitempty"` }
type MitreCVE ¶
type MitreCVE struct { CveMetadata CveMetadata Containers Containers }
type MitreVersion ¶
type Node ¶
type Node struct { Type NodeType `json:"type"` Version int `json:"version,omitempty"` Attributes *Attributes `json:"attrs,omitempty"` Content []*Node `json:"content,omitempty"` Marks []MarkStruct `json:"marks,omitempty"` Text string `json:"text,omitempty"` }
func (*Node) AddContent ¶
type Vulnerability ¶
type Vulnerability struct { ID string `json:"id,omitempty"` CreatedAt string `json:"created_at,omitempty"` Summary string `json:"summary,omitempty"` Component string `json:"component,omitempty"` Description string `json:"details,omitempty"` AffectedVersions []*Version `json:"-"` Affected []*Affected `json:"affected,omitempty"` FixedVersions []*Version `json:"-"` Urls []string `json:"references,omitempty"` CvssV3 Cvssv3 `json:"cvssv3,omitempty"` Severity string `json:"severity,omitempty"` Major bool `json:"-"` }
func LoadCveFromMitre ¶
func LoadCveFromMitre(externalURL string, cveID string) (*Vulnerability, error)
func ParseVulnItem ¶
func ParseVulnItem(item interface{}, mid string) (*Vulnerability, error)
Click to show internal directories.
Click to hide internal directories.