Documentation
¶
Overview ¶
Package supplychain implements the package-age supply-chain filter.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allowlist ¶
type Allowlist struct {
// contains filtered or unexported fields
}
Allowlist holds explicitly approved packages that bypass the age check. Entry format: "ecosystem/name" (all versions) or "ecosystem/name@version" (specific).
func LoadAllowlist ¶
LoadAllowlist reads an allowlist file and returns an *Allowlist. Each non-blank, non-comment line is one entry: "ecosystem/name" or "ecosystem/name@version". Lines beginning with '#' and blank lines are ignored; entries are whitespace-trimmed.
func NewAllowlist ¶
NewAllowlist creates an Allowlist from a slice of entry strings.
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter implements the supply chain package age check.
func NewFilter ¶
func NewFilter(cfg config.SupplyChainConfig, allowlist *Allowlist) *Filter
NewFilter creates a Filter with the given configuration and allowlist.
func (*Filter) Check ¶
func (f *Filter) Check(_ context.Context, ref *gate.PackageRef, meta *gate.PackageMetadata) FilterResult
Check applies the supply chain filter. The caller must provide pre-fetched PackageMetadata. No network calls are made inside Check.
type FilterResult ¶
type FilterResult = gate.FilterResult
FilterResult is an alias for gate.FilterResult kept here for backward compatibility. New code should use gate.FilterResult directly.