library

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: Apache-2.0 Imports: 18 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

Functions

This section is empty.

Types

type Detector

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

func NewDetector

func NewDetector(factory Factory) Detector

func (Detector) Detect

func (d Detector) Detect(_, filePath string, _ time.Time, pkgs []ftypes.LibraryInfo) ([]types.DetectedVulnerability, error)

type Driver

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

func NewBundlerDriver added in v0.9.0

func NewBundlerDriver() Driver

func NewCargoDriver added in v0.9.0

func NewCargoDriver() Driver

func NewComposerDriver added in v0.9.0

func NewComposerDriver() Driver

func NewDriver added in v0.9.0

func NewDriver(p string, advisories ...advisory) Driver

func NewNpmDriver added in v0.9.0

func NewNpmDriver() Driver

func NewPipenvDriver added in v0.9.0

func NewPipenvDriver() Driver

func NewPoetryDriver added in v0.9.0

func NewPoetryDriver() Driver

func NewYarnDriver added in v0.9.0

func NewYarnDriver() Driver

func (*Driver) Detect

func (driver *Driver) Detect(pkgName string, pkgVer *version.Version) ([]types.DetectedVulnerability, error)

func (*Driver) Type

func (d *Driver) Type() string

type DriverFactory

type DriverFactory struct{}

func (DriverFactory) NewDriver

func (d DriverFactory) NewDriver(filename string) (Driver, error)

type Factory

type Factory interface {
	NewDriver(filename string) (Driver, error)
}

type MockOperation added in v0.5.0

type MockOperation struct {
	mock.Mock
}

MockOperation is an autogenerated mock type for the Operation type

func (*MockOperation) ApplyDetectExpectation added in v0.5.0

func (_m *MockOperation) ApplyDetectExpectation(e OperationDetectExpectation)

func (*MockOperation) ApplyDetectExpectations added in v0.5.0

func (_m *MockOperation) ApplyDetectExpectations(expectations []OperationDetectExpectation)

func (*MockOperation) Detect added in v0.5.0

func (_m *MockOperation) Detect(imageName string, filePath string, created time.Time, pkgs []types.LibraryInfo) ([]pkgtypes.DetectedVulnerability, error)

Detect provides a mock function with given fields: imageName, filePath, created, pkgs

type Operation

type Operation interface {
	Detect(imageName string, filePath string, created time.Time, pkgs []ftypes.LibraryInfo) (vulns []types.DetectedVulnerability, err error)
}

type OperationDetectArgs added in v0.5.0

type OperationDetectArgs struct {
	ImageName         string
	ImageNameAnything bool
	FilePath          string
	FilePathAnything  bool
	Created           time.Time
	CreatedAnything   bool
	Pkgs              []types.LibraryInfo
	PkgsAnything      bool
}

type OperationDetectExpectation added in v0.5.0

type OperationDetectExpectation struct {
	Args    OperationDetectArgs
	Returns OperationDetectReturns
}

type OperationDetectReturns added in v0.5.0

type OperationDetectReturns struct {
	Vulns []pkgtypes.DetectedVulnerability
	Err   error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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