types

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyses

type Analyses []Analysis

Analyses is a list of Analysis

type Analysis

type Analysis struct {
	ID        string    `json:"id,omitempty" pg:"id,type:uuid,pk,default:uuid_generate_v4()"`
	Image     string    `json:"image,omitempty" pg:"image" validate:"required"`
	Status    string    `json:"status,omitempty" pg:"status"`
	CreatedAt time.Time `json:"created_at,omitempty" pg:"created_at,notnull,default:now()"`
	UpdatedAt time.Time `json:"updated_at,omitempty" pg:"updated_at,notnull,default:now()"`
	Result    string    `json:"result,omitempty" pg:"result"`
	Errors    []string  `json:"errors,omitempty" pg:"errors"`
	Results   Results   `json:"vilicus_results,omitempty" pg:"vilicus_results"`
}

Analysis is the struct that stores all data from analysis performed.

type Results

type Results struct {
	ClairResult         VendorResults `json:"clair,omitempty"`
	AnchoreEngineResult VendorResults `json:"anchore_engine,omitempty"`
	TrivyResult         VendorResults `json:"trivy,omitempty"`
}

Results is a struct that represents vilicus scan results.

func (Results) String

func (r Results) String() string

func (Results) VulnList

func (r Results) VulnList() []Vuln

VulnList is a function that return a merged list with all vulns

type VendorResults

type VendorResults struct {
	UnknownVulns    []Vuln `json:"unknown_vulns,omitempty"`
	NegligibleVulns []Vuln `json:"negligible_vulns,omitempty"`
	LowVulns        []Vuln `json:"low_vulns,omitempty"`
	MediumVulns     []Vuln `json:"medium_vulns,omitempty"`
	HighVulns       []Vuln `json:"high_vulns,omitempty"`
	CriticalVulns   []Vuln `json:"critical_vulns,omitempty"`
}

VendorResults stores all Unknown, Negligible Low, Medium, High and Critical vulnerabilities for a vendor

func (VendorResults) String

func (v VendorResults) String() string

type Vuln

type Vuln struct {
	Fix            string   `json:"fix"`
	URL            []string `json:"urls"`
	Name           string   `json:"name"`
	Severity       string   `json:"severity"`
	Vendor         string   `json:"vendor"`
	PackageName    string   `json:"package_name"`
	PackageVersion string   `json:"package_version"`
}

Vuln is the struct that stores vulnerability information.

func (Vuln) String

func (v Vuln) String() string

Jump to

Keyboard shortcuts

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