cve

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Affected

type Affected struct {
	Ranges []*Range `json:"ranges,omitempty"`
}

type Containers

type Containers struct {
	Cna struct {
		Affected []struct {
			Product  string
			Vendor   string
			Versions []*MitreVersion
		}
		Descriptions []Descriptions
		Metrics      []struct {
			CvssV3_1 struct {
				VectorString string
			}
			CvssV3_0 struct {
				VectorString string
			}
		}
	}
}

type CveMetadata

type CveMetadata struct {
	CveId string
}

type Cvssv3

type Cvssv3 struct {
	Vector string
	Score  float64
}

type Descriptions

type Descriptions struct {
	Lang  string
	Value string
}

type Event

type Event struct {
	Introduced   string `json:"introduced,omitempty"`
	Fixed        string `json:"fixed,omitempty"`
	LastAffected string `json:"last_affected,omitempty"`
}

type Item

type Item struct {
	ID            string `json:"id,omitempty"`
	Summary       string `json:"summary,omitempty"`
	ContentText   string `json:"content_text,omitempty"`
	DatePublished string `json:"date_published,omitempty"`
	ExternalURL   string `json:"external_url,omitempty"`
	URL           string `json:"url,omitempty"`
}

type K8sCVE

type K8sCVE struct {
	Items []Item `json:"items,omitempty"`
}

type K8sVulnDB

type K8sVulnDB struct {
	Cves []*Vulnerability
}

func Collect

func Collect() (*K8sVulnDB, error)

func ParseVulnDBData

func ParseVulnDBData(db K8sCVE) (*K8sVulnDB, error)

type MitreCVE

type MitreCVE struct {
	CveMetadata CveMetadata
	Containers  Containers
}

type MitreVersion

type MitreVersion struct {
	Status          string
	Version         string
	LessThanOrEqual string
	LessThan        string
	VersionType     string
}

type Range

type Range struct {
	Events    []*Event `json:"events,omitempty"`
	RangeType string   `json:"type,omitempty"`
}

type Version

type Version struct {
	Introduced   string `json:"introduced,omitempty"`
	Fixed        string `json:"fixed,omitempty"`
	LastAffected string `json:"last_affected,omitempty"`
	FixedIndex   int    `json:"-"`
}

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"`
	Urls             []string    `json:"references,omitempty"`
	CvssV3           Cvssv3      `json:"cvssv3,omitempty"`
	Severity         string      `json:"severity,omitempty"`
}

Jump to

Keyboard shortcuts

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