scanner

package
v1.8.9 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2024 License: Apache-2.0 Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPackageManifestScanner

func NewPackageManifestScanner(config Config,
	readers []readers.PackageManifestReader,
	enrichers []PackageMetaEnricher,
	analyzers []analyzer.Analyzer,
	reporters []reporter.Reporter) *packageManifestScanner

Types

type Config

type Config struct {
	ExcludePatterns    []string
	ConcurrentAnalyzer int
	TransitiveAnalysis bool
	TransitiveDepth    int
	Experimental       bool
}

type InsightsBasedPackageMetaEnricherConfig added in v1.4.0

type InsightsBasedPackageMetaEnricherConfig struct {
	ApiUrl     string
	ApiAuthKey string
}

type PackageDependencyCallbackFn

type PackageDependencyCallbackFn func(pkg *models.Package) error

Callback to receive a discovery package dependency

type PackageMetaEnricher

type PackageMetaEnricher interface {
	Name() string
	Enrich(pkg *models.Package, cb PackageDependencyCallbackFn) error
}

Enrich meta information associated with the package

func NewInsightBasedPackageEnricherV2 added in v1.8.3

func NewInsightBasedPackageEnricherV2(cc *grpc.ClientConn) (PackageMetaEnricher, error)

NewInsightBasedPackageEnricherV2 creates a new instance of the enricher using Insights API v2. It requires a pre-configured gRPC client connection.

type ScannerCallbackErrArgFn

type ScannerCallbackErrArgFn func(error)

type ScannerCallbackNoArgFn

type ScannerCallbackNoArgFn func()

type ScannerCallbackOnManifestFn

type ScannerCallbackOnManifestFn func(manifest *models.PackageManifest)

type ScannerCallbackOnPackageFn

type ScannerCallbackOnPackageFn func(pkg *models.Package)

type ScannerCallbacks

type ScannerCallbacks struct {
	OnStartEnumerateManifest ScannerCallbackNoArgFn      // Manifest enumeration is starting
	OnEnumerateManifest      ScannerCallbackOnManifestFn // A manifest is read by reader
	OnStart                  ScannerCallbackNoArgFn      // Manifest scan phase is starting
	OnStartManifest          ScannerCallbackOnManifestFn // A manifest is starting to be scanned
	OnStartPackage           ScannerCallbackOnPackageFn  // A package analysis is starting
	OnAddTransitivePackage   ScannerCallbackOnPackageFn  // A transitive dependency is discovered
	OnDonePackage            ScannerCallbackOnPackageFn  // A package analysis is finished
	OnDoneManifest           ScannerCallbackOnManifestFn // A manifest analysis is finished
	BeforeFinish             ScannerCallbackNoArgFn      // Scan is about to finish
	OnStop                   ScannerCallbackErrArgFn     // Scan is finished
}

Jump to

Keyboard shortcuts

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