imodels

package
v2.0.0-beta1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageInfo

type PackageInfo struct {
	*extractor.Inventory
	// contains filtered or unexported fields
}

PackageInfo provides getter functions for commonly used fields of inventory and applies transformations when required for use in osv-scanner

func FromInventory

func FromInventory(inventory *extractor.Inventory) PackageInfo

FromInventory converts an extractor.Inventory into a PackageInfo.

func (*PackageInfo) Commit

func (pkg *PackageInfo) Commit() string

func (*PackageInfo) DepGroups

func (pkg *PackageInfo) DepGroups() []string

func (*PackageInfo) Ecosystem

func (pkg *PackageInfo) Ecosystem() ecosystem.Parsed

func (*PackageInfo) Location

func (pkg *PackageInfo) Location() string

func (*PackageInfo) Name

func (pkg *PackageInfo) Name() string

func (*PackageInfo) OSPackageName

func (pkg *PackageInfo) OSPackageName() string

func (*PackageInfo) SourceType

func (pkg *PackageInfo) SourceType() SourceType

func (*PackageInfo) Version

func (pkg *PackageInfo) Version() string

type PackageScanResult

type PackageScanResult struct {
	PackageInfo PackageInfo
	// TODO: Use osvschema.Vulnerability instead
	Vulnerabilities []*models.Vulnerability
	Licenses        []models.License
	LayerDetails    *extractor.LayerDetails
}

PackageScanResult represents a package and its associated vulnerabilities and licenses. This struct is used to store the results of a scan at a per package level.

type SourceType

type SourceType int

SourceType categorizes packages based on the extractor that extracted the "source", for use in the output.

const (
	SourceTypeUnknown SourceType = iota
	SourceTypeOSPackage
	SourceTypeProjectPackage
	SourceTypeArtifact
	SourceTypeSBOM
	SourceTypeGit
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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