csaf

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSAF

type CSAF struct {
	Document        DocumentMetadata `json:"document"`
	ProductTree     ProductBranch    `json:"product_tree"`
	Vulnerabilities []Vulnerability  `json:"vulnerabilities"`
}

func Open

func Open(path string) (*CSAF, error)

func (*CSAF) FirstProductName

func (csafDoc *CSAF) FirstProductName() string

type DocumentMetadata

type DocumentMetadata struct {
	Title    string   `json:"title"`
	Tracking Tracking `json:"tracking"`
}

type Product

type Product struct {
	Name                 string            `json:"name"`
	ID                   string            `json:"product_id"`
	IdentificationHelper map[string]string `json:"product_identification_helper"`
}

type ProductBranch

type ProductBranch struct {
	Category string          `json:"category"`
	Name     string          `json:"name"`
	Branches []ProductBranch `json:"branches"`
	Product  Product         `json:"product,omitempty"`
}

func (*ProductBranch) FindFirstProduct

func (branch *ProductBranch) FindFirstProduct() string

FindFirstProduct recursively searches for the first product in the tree

func (*ProductBranch) FindProductIdentifier

func (branch *ProductBranch) FindProductIdentifier(helperType, helperValue string) *Product

FindFirstProduct recursively searches for the first product in the tree

type ThreatData

type ThreatData struct {
	Category   string   `json:"category"`
	Details    string   `json:"details"`
	ProductIDs []string `json:"product_ids"`
}

type Tracking

type Tracking struct {
	ID                 string    `json:"id"`
	CurrentReleaseDate time.Time `json:"current_release_date"`
}

type Vulnerability

type Vulnerability struct {
	CVE           string              `json:"cve"`
	ProductStatus map[string][]string `json:"product_status"`
	Threats       []ThreatData        `json:"threats"`
}

Jump to

Keyboard shortcuts

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