scan

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

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.ArtifactSet,
	RemoteSuperSet,
)

RemoteFilesystemSet binds filesystem dependencies for client/server mode

View Source
var RemoteRepositorySet = wire.NewSet(
	repo.ArtifactSet,
	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.ArtifactSet,
	StandaloneSuperSet,
)

StandaloneFilesystemSet binds filesystem dependencies

View Source
var StandaloneRepositorySet = wire.NewSet(
	repo.ArtifactSet,
	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 Backend

type Backend interface {
	Scan(ctx context.Context, target, artifactKey string, blobKeys []string, options types.ScanOptions) (
		response types.ScanResponse, err error)
}

Backend defines the interface for security scanning implementations. It can be either local.Service for standalone scanning or remote.Service for client/server mode scanning. The backend handles various types of security scanning including vulnerability, misconfiguration, secret, and license scanning.

type Service

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

Service is the main service that coordinates security scanning operations. It uses either local.Service or remote.Service as its backend implementation.

func NewService

func NewService(backend Backend, ar artifact.Artifact) Service

NewService creates a new Service instance with the specified backend implementation and artifact handler.

func (Service) ScanArtifact

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

ScanArtifact performs security scanning on the specified artifact. It first inspects the artifact to gather necessary information, then delegates the actual scanning to the configured backend implementation.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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