bill

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBatchVulns added in v0.11.8

func GetBatchVulns(ctx context.Context, purls []models.PurlDetail, iterator func(cur int, total int)) ([]models.ScanResultVulnerabilities, error)

func GetCPEDetail added in v0.9.2

func GetCPEDetail(sbm *sbom.SBOM, inputRefs []InputSbomRef) []string

func GetOfflineCpeVulns added in v0.9.2

func GetOfflineCpeVulns(indices cache.InfoFile, cpes []string, iterator func(cur int, total int), warnOnly bool) ([]models.ScanResultVulnerabilities, error)

func GetOfflineMeta added in v0.10.0

func GetOfflineMeta(indices cache.InfoFile, vulns []models.ScanResultVulnerabilities, warnOnly bool) ([]models.ScanResultVulnerabilities, bool, error)

GetOfflineMeta enriches each vuln with CVSS / KEV / description data from the vulncheck-nvd2 index. The second return value reports whether that index was actually available; callers use it to surface a hint to the user when the table would otherwise show empty score columns. Without warnOnly the missing-index condition is a hard error; with warnOnly the input vulns are passed through unchanged so the caller can still render what it found.

func GetOfflineVulns

func GetOfflineVulns(indices cache.InfoFile, purls []models.PurlDetail, iterator func(cur int, total int), warnOnly bool) ([]models.ScanResultVulnerabilities, error)

func GetPURLDetail

func GetPURLDetail(sbm *sbom.SBOM, inputRefs []InputSbomRef) []models.PurlDetail

func GetSBOM

func GetSBOM(dir string, opts SBOMOptions) (*sbom.SBOM, error)

func GetVulns

func GetVulns(ctx context.Context, purls []models.PurlDetail, iterator func(cur int, total int)) ([]models.ScanResultVulnerabilities, error)

func SaveSBOM

func SaveSBOM(sbm *sbom.SBOM, file string) error

Types

type InputSbomRef added in v0.8.5

type InputSbomRef struct {
	SbomRef string
	PURL    string
	CPE     string
}

func LoadSBOM

func LoadSBOM(inputFile string) (*sbom.SBOM, []InputSbomRef, error)

type SBOMOptions added in v1.1.0

type SBOMOptions struct {
	// Enrich is a passthrough of syft's `--enrich` scope list. Empty means
	// enrichment is disabled and syft runs with its default (offline-safe)
	// behaviour. Non-empty entries opt in to network-backed metadata lookups
	// (proxy.golang.org, Maven Central, NPM registry, PyPI) — see
	// buildEnrichConfig for which fields each scope flips.
	Enrich []string
}

SBOMOptions carries knobs for GetSBOM. Kept as a struct so future toggles can be added without churning every caller.

Jump to

Keyboard shortcuts

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