helpers

package
v0.0.25-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyBoundaryVersionExists

func AnyBoundaryVersionExists(
	depName string,
	source knowledge.Sources,
	db *bun.DB,
	versionSet map[string]bool,
	getVersions func(string, *bun.DB) ([]string, error),
) (bool, map[string]bool)

AnyBoundaryVersionExists checks if at least one CPE version boundary exists as a real published version. The getVersions callback retrieves versions for the given package name from the appropriate ecosystem registry. If versionSet is non-nil, it is used directly (cache hit); otherwise getVersions is called and the resulting set is returned for caching by the caller.

func IsGenericVendor

func IsGenericVendor(vendor string) bool

IsGenericVendor checks if a vendor string is a generic/unknown placeholder that provides no useful signal for matching.

func VendorRelatedToProduct

func VendorRelatedToProduct(vendor, product string) bool

VendorRelatedToProduct checks whether a CPE vendor is plausibly related to the given product name. This filters out cross-ecosystem false positives when targetSw is a wildcard (e.g., "gfi" is unrelated to "archiver", but "archiver_project" is related to "archiver").

Types

This section is empty.

Jump to

Keyboard shortcuts

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