cve

package
v0.0.0-...-7d63b48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 4, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

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

Variables

This section is empty.

Functions

func AmendCveDoc

func AmendCveDoc(doc string) string

func Render

func Render(w io.Writer, source []byte) error

func ValidateCveData

func ValidateCveData(cves []Vulnerability)

Types

type AdditionalFields

type AdditionalFields struct {
	Cvss      string
	Score     string
	Component string
}

type Attributes

type Attributes struct {
	Width    float32 `json:"width,omitempty"`
	Layout   Layout  `json:"layout,omitempty"`
	Level    int     `json:"level,omitempty"`
	Language string  `json:"language,omitempty"`
}

type Content

type Content struct {
	Description     string    `json:"description,omitempty"`
	ComponentName   string    `json:"component_name,omitempty"`
	AffectedVersion []Version `json:"affected_version,omitempty"`
	FixedVersion    []Version `json:"fixed_version,omitempty"`
	Cvss            string    `json:"cvss,omitempty"`
}

type JSONRenderer

type JSONRenderer struct {
	// contains filtered or unexported fields
}

func NewRenderer

func NewRenderer() *JSONRenderer

func (*JSONRenderer) AddOptions

func (*JSONRenderer) AddOptions(...renderer.Option)

func (*JSONRenderer) Render

func (r *JSONRenderer) Render(w io.Writer, source []byte, n ast.Node) error

Render implements goldmark.Renderer interface.

type K8sVulnDB

type K8sVulnDB struct {
	Cves []Vulnerability
}

func ParseVulneDB

func ParseVulneDB(vulnDB []byte) (*K8sVulnDB, error)

type Layout

type Layout string

type Mark

type Mark string

Mark represents a text formatting directive

const (
	MarkCode      Mark = "code"
	MarkEm        Mark = "em"
	MarkLink      Mark = "link"
	MarkStrike    Mark = "strike"
	MarkStrong    Mark = "strong"
	MarkSubsup    Mark = "subsup"
	MarkTextcolor Mark = "textColor"
	MarkUnderline Mark = "underline"
)

Enum values for Mark text formatting

type MarkAttributes

type MarkAttributes struct {
	Href  string `json:"href,omitempty"`
	Title string `json:"title,omitempty"`
}

type MarkStruct

type MarkStruct struct {
	Type       Mark            `json:"type,omitempty"`
	Attributes *MarkAttributes `json:"attrs,omitempty"`
}

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

func (n *Node) AddContent(c *Node)

type NodeType

type NodeType string

type Version

type Version struct {
	From  string `json:"from,omitempty"`
	To    string `json:"to,omitempty"`
	Fixed string `json:"fixed,omitempty"`
}

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:"description,omitempty"`
	AffectedVersion []Version `json:"affected_version,omitempty"`
	FixedVersion    []Version `json:"fixed_version,omitempty"`
	Urls            []string  `json:"urls,omitempty"`
	Cvss            string    `json:"cvss,omitempty"`
	Severity        string    `json:"severity,omitempty"`
	Score           float64   `json:"score,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL