bill

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: Apache-2.0 Imports: 25 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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, []models.UnprocessedComponent, error)

GetBatchVulns looks up every purl and also returns the components the API could not assess. Those never appear in the findings, so a caller that ignores the second return cannot tell a partial scan from a clean one.

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

func SortResults added in v1.2.0

func SortResults(vulns []models.ScanResultVulnerabilities)

SortResults orders findings so output.json is stable between identical scans; vulncheck-oss/action hashes it to dedupe PR comments. Neither source guarantees an order: the API dedupes through a map, and the offline queries carry no ORDER BY.

func ValidateEnrich added in v1.2.0

func ValidateEnrich(directives []string) error

ValidateEnrich checks --enrich directives before any cataloguing starts. Without it an unrecognised scope is silently ignored: enrichmentScope simply never matches it, so `--enrich typo` or `--enrich vcpkg` looks accepted and quietly enriches nothing. Failing up front is the difference between "your flag did nothing" and "your SBOM is missing the metadata you asked for".

Matching is case-sensitive and the +/- prefixes are accepted, both for parity with syft, whose own directive comparison is an exact match against lowercase task names. Scopes in unsupportedScopes are rejected only in their enabling forms; see the negation carve-out below.

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