vulnerability

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: Apache-2.0 Imports: 12 Imported by: 5

Documentation

Index

Constants

View Source
const (
	DefaultIgnoreFile = ".trivyignore"
)

Variables

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(dbc db.Config) Client

func (Client) FillInfo added in v0.3.0

func (c Client) FillInfo(vulns []types.DetectedVulnerability, reportType string)

func (Client) Filter added in v0.3.0

func (c Client) Filter(vulns []types.DetectedVulnerability, severities []dbTypes.Severity,
	ignoreUnfixed bool, ignoreFile string) []types.DetectedVulnerability

type FillInfoArgs added in v0.5.0

type FillInfoArgs struct {
	Vulns              []types.DetectedVulnerability
	VulnsAnything      bool
	ReportType         string
	ReportTypeAnything bool
}

type FillInfoExpectation added in v0.5.0

type FillInfoExpectation struct {
	Args FillInfoArgs
}

type FilterArgs added in v0.5.0

type FilterArgs struct {
	Vulns                 []types.DetectedVulnerability
	VulnsAnything         bool
	Severities            []pkgtypes.Severity
	SeveritiesAnything    bool
	IgnoreUnfixed         bool
	IgnoreUnfixedAnything bool
	IgnoreFile            string
	IgnoreFileAnything    bool
}

type FilterExpectation added in v0.5.0

type FilterExpectation struct {
	Args    FilterArgs
	Returns FilterReturns
}

type FilterReturns added in v0.5.0

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

type MockOperation added in v0.5.0

type MockOperation struct {
	mock.Mock
}

MockOperation is an autogenerated mock type for the Operation type

func (*MockOperation) ApplyFillInfoExpectation added in v0.5.0

func (_m *MockOperation) ApplyFillInfoExpectation(e FillInfoExpectation)

func (*MockOperation) ApplyFillInfoExpectations added in v0.5.0

func (_m *MockOperation) ApplyFillInfoExpectations(expectations []FillInfoExpectation)

func (*MockOperation) ApplyFilterExpectation added in v0.5.0

func (_m *MockOperation) ApplyFilterExpectation(e FilterExpectation)

func (*MockOperation) ApplyFilterExpectations added in v0.5.0

func (_m *MockOperation) ApplyFilterExpectations(expectations []FilterExpectation)

func (*MockOperation) FillInfo added in v0.5.0

func (_m *MockOperation) FillInfo(vulns []types.DetectedVulnerability, reportType string)

FillInfo provides a mock function with given fields: vulns, reportType

func (*MockOperation) Filter added in v0.5.0

func (_m *MockOperation) Filter(vulns []types.DetectedVulnerability, severities []pkgtypes.Severity, ignoreUnfixed bool, ignoreFile string) []types.DetectedVulnerability

Filter provides a mock function with given fields: vulns, severities, ignoreUnfixed, ignoreFile

type Operation added in v0.3.0

type Operation interface {
	FillInfo(vulns []types.DetectedVulnerability, reportType string)
	Filter(vulns []types.DetectedVulnerability, severities []dbTypes.Severity,
		ignoreUnfixed bool, ignoreFile string) []types.DetectedVulnerability
}

Jump to

Keyboard shortcuts

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