api

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComponentReport added in v0.4.0

type ComponentReport struct {
	Reference       string          `json:"reference"`
	Coordinates     string          `json:"coordinates"`
	Description     string          `json:"description"`
	Vulnerabilities []Vulnerability `json:"vulnerabilities"`
}

type DependencyManager

type DependencyManager interface {
	UpdateDependency(dep DependencyTreeNode) (string, error)
	Verify() (TestReport, error)
	StageUpdate() error
	DependencyTree() (DependencyTree, error)
	IsMultiModules() (bool, error)
	SubModule(module string) (DependencyManager, error)
}

type DependencyTree

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

func NewDependencyTree

func NewDependencyTree(nodes []DependencyTreeNode) DependencyTree

func (DependencyTree) AllVulnerabilities

func (t DependencyTree) AllVulnerabilities() []Vulnerability

func (DependencyTree) CriticalOrHigh added in v0.3.5

func (t DependencyTree) CriticalOrHigh() (DependencyTree, Vulnerability, bool)

func (DependencyTree) Find

func (t DependencyTree) Find(depID string) (DependencyTreeNode, bool)

func (DependencyTree) FindCVE

func (t DependencyTree) FindCVE(cveID string) (Vulnerability, bool)

func (DependencyTree) FirstChildWithCVE added in v0.3.5

func (t DependencyTree) FirstChildWithCVE(cveID string) (DependencyTree, bool)

func (DependencyTree) Get

func (DependencyTree) MostVulnerable

func (t DependencyTree) MostVulnerable() (DependencyTree, bool)

MostVulnerable returns the subtree with the highest CVSS score, if any

func (DependencyTree) Nodes

func (t DependencyTree) Nodes() []DependencyTreeNode

func (DependencyTree) Root

func (DependencyTree) Set

func (t DependencyTree) Set(i int, node DependencyTreeNode)

func (DependencyTree) Subtree

func (t DependencyTree) Subtree(i int, rootID string) (DependencyTree, bool)

func (DependencyTree) VulnerabilityCount

func (t DependencyTree) VulnerabilityCount() int

type DependencyTreeNode

type DependencyTreeNode struct {
	ID              string
	Type            string
	Group           string
	Artifact        string
	Version         string
	Scope           string
	Depth           int
	Raw             string
	PackageUrl      string
	Vulnerabilities []Vulnerability
}

type TestReport

type TestReport struct {
	Passed  bool
	Summary string
	Error   string
}

type Vulnerability

type Vulnerability struct {
	Reference          string   `json:"reference"`
	CvssVector         string   `json:"cvssVector"`
	ExternalReferences []string `json:"externalReferences"`
	Cve                string   `json:"cve"`
	CvssScore          float64  `json:"cvssScore"`
	DisplayName        string   `json:"displayName"`
	Description        string   `json:"description"`
	Title              string   `json:"title"`
}

func (Vulnerability) NVDUrl added in v0.4.0

func (v Vulnerability) NVDUrl() string

func (Vulnerability) Severity

func (v Vulnerability) Severity() string

Jump to

Keyboard shortcuts

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