ports

package
v0.3.48 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationProfileRepository added in v0.3.48

type ApplicationProfileRepository interface {
	GetApplicationProfile(ctx context.Context, namespace string, name string) (v1beta1.ApplicationProfile, error)
}

type CVERepository

type CVERepository interface {
	GetCVE(ctx context.Context, name, SBOMCreatorVersion, CVEScannerVersion, CVEDBVersion string) (domain.CVEManifest, error)
	GetCVESummary(ctx context.Context) (*v1beta1.VulnerabilityManifestSummary, error)
	StoreCVE(ctx context.Context, cve domain.CVEManifest, withRelevancy bool) error
	StoreCVESummary(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest, withRelevancy bool) error
	StoreVEX(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest, withRelevancy bool) error
}

CVERepository is the port implemented by adapters to be used in ScanService to store CVE manifests

type CVEScanner

type CVEScanner interface {
	DBVersion(ctx context.Context) string
	Ready(ctx context.Context) bool
	ScanSBOM(ctx context.Context, sbom domain.SBOM) (domain.CVEManifest, error)
	Version(ctx context.Context) string
}

CVEScanner is the port implemented by adapters to be used in ScanService to generate CVE manifests

type ContainerRelevancyScan added in v0.3.48

type ContainerRelevancyScan struct {
	ContainerName string
	ImageID       string
	ImageTag      string
	InstanceID    instanceidhandler.IInstanceID
	Labels        map[string]string
	RelevantFiles mapset.Set[string]
	Wlid          string
}

type Platform

type Platform interface {
	GetCVEExceptions(ctx context.Context) (domain.CVEExceptions, error)
	ReportError(ctx context.Context, err error) error
	SendStatus(ctx context.Context, step int) error
	SubmitCVE(ctx context.Context, cve domain.CVEManifest, cvep domain.CVEManifest) error
}

Platform is the port implemented by adapters to be used in ScanService to report scan results and send telemetry data

type Relevancy added in v0.3.48

type Relevancy interface {
	GetContainerRelevancyScans(ctx context.Context, namespace, name string) ([]ContainerRelevancyScan, error)
}

Relevancy is the port implemented by adapters to be used in ScanService to calculate filtered SBOMs

type SBOMCreator

type SBOMCreator interface {
	CreateSBOM(ctx context.Context, name, imageID, imageTag string, options domain.RegistryOptions) (domain.SBOM, error)
	Version() string
}

SBOMCreator is the port implemented by adapters to be used in ScanService to generate SBOM

type SBOMRepository

type SBOMRepository interface {
	GetSBOM(ctx context.Context, name, SBOMCreatorVersion string) (domain.SBOM, error)
	StoreSBOM(ctx context.Context, sbom domain.SBOM) error
}

SBOMRepository is the port implemented by adapters to be used in ScanService to store SBOMs

type ScanService

type ScanService interface {
	GenerateSBOM(ctx context.Context) error
	Ready(ctx context.Context) bool
	ScanAP(ctx context.Context) error
	ScanCVE(ctx context.Context) error
	ScanRegistry(ctx context.Context) error
	ValidateGenerateSBOM(ctx context.Context, workload domain.ScanCommand) (context.Context, error)
	ValidateScanAP(ctx context.Context, workload domain.ScanCommand) (context.Context, error)
	ValidateScanCVE(ctx context.Context, workload domain.ScanCommand) (context.Context, error)
	ValidateScanRegistry(ctx context.Context, workload domain.ScanCommand) (context.Context, error)
}

ScanService is the port implemented by the business component ScanService

Jump to

Keyboard shortcuts

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