scanner

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2023 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

RemoteArchiveSet binds remote archive dependencies

RemoteDockerSet binds remote docker dependencies

View Source
var RemoteFilesystemSet = wire.NewSet(
	flocal.NewArtifact,
	RemoteSuperSet,
)

RemoteFilesystemSet binds filesystem dependencies for client/server mode

View Source
var RemoteRepositorySet = wire.NewSet(
	repo.NewArtifact,
	RemoteSuperSet,
)

RemoteRepositorySet binds repository dependencies for client/server mode

RemoteSBOMSet binds sbom dependencies for client/server mode

RemoteSuperSet is used in the client mode

RemoteVMSet binds vm dependencies for client/server mode

StandaloneArchiveSet binds archive scan dependencies

StandaloneDockerSet binds docker dependencies

View Source
var StandaloneFilesystemSet = wire.NewSet(
	flocal.NewArtifact,
	StandaloneSuperSet,
)

StandaloneFilesystemSet binds filesystem dependencies

View Source
var StandaloneRepositorySet = wire.NewSet(
	repo.NewArtifact,
	StandaloneSuperSet,
)

StandaloneRepositorySet binds repository dependencies

View Source
var StandaloneSBOMSet = wire.NewSet(
	sbom.NewArtifact,
	StandaloneSuperSet,
)

StandaloneSBOMSet binds sbom dependencies

StandaloneSuperSet is used in the standalone mode

StandaloneVMSet binds vm dependencies

Functions

This section is empty.

Types

type Driver

type Driver interface {
	Scan(ctx context.Context, target, artifactKey string, blobKeys []string, options types.ScanOptions) (
		results types.Results, osFound ftypes.OS, err error)
}

Driver defines operations of scanner

type DriverScanArgs

type DriverScanArgs struct {
	Ctx              context.Context
	CtxAnything      bool
	Target           string
	TargetAnything   bool
	ImageID          string
	ImageIDAnything  bool
	LayerIDs         []string
	LayerIDsAnything bool
	Options          types.ScanOptions
	OptionsAnything  bool
}

type DriverScanExpectation

type DriverScanExpectation struct {
	Args    DriverScanArgs
	Returns DriverScanReturns
}

type DriverScanReturns

type DriverScanReturns struct {
	Results types.Results
	OsFound fanaltypes.OS
	Err     error
}

type MockDriver

type MockDriver struct {
	mock.Mock
}

MockDriver is an autogenerated mock type for the Driver type

func (*MockDriver) ApplyScanExpectation

func (_m *MockDriver) ApplyScanExpectation(e DriverScanExpectation)

func (*MockDriver) ApplyScanExpectations

func (_m *MockDriver) ApplyScanExpectations(expectations []DriverScanExpectation)

func (*MockDriver) Scan

func (_m *MockDriver) Scan(ctx context.Context, target string, artifactKey string, blobKeys []string, options types.ScanOptions) (types.Results, fanaltypes.OS, error)

Scan provides a mock function with given fields: ctx, target, imageID, layerIDs, options

type Scanner

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

Scanner implements the Artifact and Driver operations

func NewScanner

func NewScanner(driver Driver, ar artifact.Artifact) Scanner

NewScanner is the factory method of Scanner

func (Scanner) ScanArtifact

func (s Scanner) ScanArtifact(ctx context.Context, options types.ScanOptions) (types.Report, error)

ScanArtifact scans the artifacts and returns results

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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